惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
V
V2EX
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
The Cloudflare Blog
T
Tailwind CSS Blog
H
Help Net Security
腾讯CDC
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
C
Check Point Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: add CJK error patterns to failover classification (#...
tomcatzh · 2026-04-28 · via Recent Commits to openclaw:main

@@ -40,6 +40,14 @@ const COMMON_AUTH_ERROR_PATTERNS = [

4040

/\bfailed to (?:extract|parse|validate|decode)\b.*\btoken\b/,

4141

] as const satisfies readonly ErrorPattern[];

424243+

const CJK_AUTH_ERROR_PATTERNS = [

44+

"无权访问",

45+

"认证失败",

46+

"鉴权失败",

47+

"密钥无效",

48+

"apikey 无效",

49+

] as const satisfies readonly ErrorPattern[];

50+4351

const ZAI_BILLING_CODE_1311_RE = /"code"\s*:\s*1311\b/;

4452

const ZAI_AUTH_CODE_1113_RE = /"code"\s*:\s*1113\b/;

4553

const STATUS_INTERNAL_SERVER_ERROR_RE = /\bstatus:\s*internal server error\b/i;

@@ -69,6 +77,14 @@ const ERROR_PATTERNS = {

6977

/\btpm\b/i,

7078

"tokens per minute",

7179

"tokens per day",

80+

// Chinese provider rate-limit messages

81+

"请求过于频繁",

82+

"调用频率",

83+

"频率限制",

84+

"配额不足",

85+

"配额已用尽",

86+

"额度不足",

87+

"额度已用尽",

7288

],

7389

overloaded: [

7490

/overloaded_error|"type"\s*:\s*"overloaded_error"/i,

@@ -79,6 +95,9 @@ const ERROR_PATTERNS = {

7995

// provider-overload (#32828).

8096

/service[_ ]unavailable.*(?:overload|capacity|high[_ ]demand)|(?:overload|capacity|high[_ ]demand).*service[_ ]unavailable/i,

8197

"high demand",

98+

// Chinese provider overloaded messages

99+

"服务过载",

100+

"当前负载过高",

82101

],

83102

serverError: [

84103

"an error occurred while processing",

@@ -92,6 +111,13 @@ const ERROR_PATTERNS = {

92111

"upstream error",

93112

"upstream connect error",

94113

"connection reset",

114+

// Chinese provider server error messages

115+

"内部错误",

116+

"服务器错误",

117+

"服务器内部错误",

118+

"系统错误",

119+

"系统繁忙",

120+

"系统异常",

95121

],

96122

timeout: [

97123

"timeout",

@@ -106,6 +132,14 @@ const ERROR_PATTERNS = {

106132

"network request failed",

107133

"fetch failed",

108134

"socket hang up",

135+

// Chinese provider error messages (ZhipuAI/GLM, Bailian, Kimi/Moonshot, DeepSeek, etc.)

136+

"网络错误",

137+

"网络异常",

138+

"服务暂时不可用",

139+

"服务繁忙",

140+

"请求超时",

141+

"连接超时",

142+

"连接错误",

109143

/\beconn(?:refused|reset|aborted)\b/i,

110144

/\benetunreach\b/i,

111145

/\behostunreach\b/i,

@@ -153,6 +187,11 @@ const ERROR_PATTERNS = {

153187

/out of extra usage/i,

154188

/draw from your extra usage/i,

155189

/extra usage is required(?: for long context requests)?/i,

190+

// Chinese provider billing messages

191+

"余额不足",

192+

"账户余额不足",

193+

"欠费",

194+

"账户已欠费",

156195

// Z.ai: error 1311 = model not included in current subscription plan (#48988)

157196

ZAI_BILLING_CODE_1311_RE,

158197

],

@@ -161,6 +200,7 @@ const ERROR_PATTERNS = {

161200

...AMBIGUOUS_AUTH_ERROR_PATTERNS,

162201

...COMMON_AUTH_ERROR_PATTERNS,

163202

...ZAI_AUTH_ERROR_PATTERNS,

203+

...CJK_AUTH_ERROR_PATTERNS,

164204

],

165205

format: [

166206

"string should match pattern",

@@ -245,6 +285,7 @@ export function isAuthErrorMessage(raw: string): boolean {

245285

AMBIGUOUS_AUTH_ERROR_PATTERNS,

246286

COMMON_AUTH_ERROR_PATTERNS,

247287

ZAI_AUTH_ERROR_PATTERNS,

288+

CJK_AUTH_ERROR_PATTERNS,

248289

]);

249290

}

250291