refactor: don't retry on 429
This commit is contained in:
@@ -181,6 +181,10 @@ class ModelProvider(ABC):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
error_str = str(error).lower()
|
error_str = str(error).lower()
|
||||||
|
|
||||||
|
if "429" in error_str or "rate limit" in error_str:
|
||||||
|
return False
|
||||||
|
|
||||||
retryable_indicators = [
|
retryable_indicators = [
|
||||||
"timeout",
|
"timeout",
|
||||||
"connection",
|
"connection",
|
||||||
@@ -193,8 +197,6 @@ class ModelProvider(ABC):
|
|||||||
"tls",
|
"tls",
|
||||||
"handshake",
|
"handshake",
|
||||||
"network",
|
"network",
|
||||||
"rate limit",
|
|
||||||
"429",
|
|
||||||
"500",
|
"500",
|
||||||
"502",
|
"502",
|
||||||
"503",
|
"503",
|
||||||
|
|||||||
Reference in New Issue
Block a user