fix(retry): recognize ZhiPu 1302 rate-limit error for retry
ZhiPu API returns code 1302 with Chinese text "速率限制" instead of standard HTTP 429 + "rate limit", causing the retry engine to treat it as non-transient and fail immediately.
This commit is contained in:
@@ -108,6 +108,7 @@ class LLMProvider(ABC):
|
||||
"connection",
|
||||
"server error",
|
||||
"temporarily unavailable",
|
||||
"速率限制",
|
||||
)
|
||||
_RETRYABLE_STATUS_CODES = frozenset({408, 409, 429})
|
||||
_TRANSIENT_ERROR_KINDS = frozenset({"timeout", "connection"})
|
||||
@@ -154,6 +155,7 @@ class LLMProvider(ABC):
|
||||
"temporarily unavailable",
|
||||
"overloaded",
|
||||
"concurrency limit",
|
||||
"速率限制",
|
||||
)
|
||||
|
||||
_SENTINEL = object()
|
||||
|
||||
Reference in New Issue
Block a user