You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
[Bug] 额度类失败的措辞匹配漏掉两类真实回包:
isQuotaExceededError()对它们返回 false(与已采纳的 #7052 同一个函数、同一量级)Summary:
packages/llm/llm/src/error.ts的isQuotaExceededError()用五条措辞正则判定终态额度,但境内两家 OpenAI 兼容网关的真实回包里,有两类高频措辞一条都不落。后果不是重试风暴,而是这类失败在判序修正之前连"是不是额度"都判不出来:403 那支先短路成AUTH(见 #3222),而 402/429 那两支靠这个函数兜底,函数返回 false 就退化成HTTP_<status>或RATE_LIMIT。复算方法(不需要账号,直接调发布产物里的函数):
0.1.7-rc.1 上的读数(同一函数、同一份五条正则表,
lib/index.js:179):前两条 false,后两条 true。也就是说quota exhausted与insufficient balance这两类已经被认出来了,缺的是「免费额度用完即停」与「欠费/拖欠」这两种境外网关不会用、境内网关默认用的说法。Proposed fix(与 #7052 同量级:一个函数里加两个分支,不碰状态码语义、不碰
DEFAULT_RETRYABLE_CODES):把FreeTierOnly/free[\s_-]*tier[\s_-]*only与in arrears|arrearage|overdue payment|no available (credits|quota)收进这张表。它们都是"换路由或充值才能恢复"的终态措辞,不该落到RATE_LIMIT或HTTP_<status>上。Notes:
code,有的放在message),所以正则表比状态码白名单更该补 —— 而detail恰好是把type + code + message拼在一起送进来的,两条都能命中。All reactions