refactor: don't retry on 429

This commit is contained in:
Fahad
2025-10-03 23:52:03 +04:00
parent f955100f3a
commit d184024820

View File

@@ -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",