From adfa8befbbef36b1ec6f1008ba539719e274f28f Mon Sep 17 00:00:00 2001 From: wjiuxing Date: Sat, 9 May 2026 22:12:39 +0800 Subject: [PATCH] feat: add Chinese error patterns to RETRYABLE_ERROR_PATTERNS --- src/hooks/runtime-fallback/constants.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hooks/runtime-fallback/constants.ts b/src/hooks/runtime-fallback/constants.ts index 206762961..cb968ef91 100644 --- a/src/hooks/runtime-fallback/constants.ts +++ b/src/hooks/runtime-fallback/constants.ts @@ -41,6 +41,14 @@ export const RETRYABLE_ERROR_PATTERNS = [ /(?:^|\s)429(?:\s|$)/, /(?:^|\s)503(?:\s|$)/, /(?:^|\s)529(?:\s|$)/, + + // Chinese rate-limit / quota patterns (Zhipu, etc.) + /使用上限/, // "usage limit" — Zhipu: "已达到 5 小时的使用上限" + /频率限制/, // "rate limit" — generic Chinese rate-limit + /请求过于频繁/, // "too many requests" — common Chinese 429 message + /暂时不可用/, // "temporarily unavailable" + /服务不可用/, // "service unavailable" + /请稍后重试/, // "please try again later" ] /**