fix(live): classify Z.ai plan denials as billing drift · openclaw/openclaw@693f06d
steipete
·
2026-05-27
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-helpers
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,6 +15,12 @@ describe("Z.ai vendor error codes (#48988)", () => {
|
15 | 15 | expect(isBillingErrorMessage(raw)).toBe(true); |
16 | 16 | }); |
17 | 17 | |
| 18 | +it("classifies prose-only subscription plan access denials as billing", () => { |
| 19 | +const raw = |
| 20 | +"FailoverError: Your current subscription plan does not yet include access to GLM-5V-Turbo"; |
| 21 | +expect(isBillingErrorMessage(raw)).toBe(true); |
| 22 | +}); |
| 23 | + |
18 | 24 | it("classifies Z.ai 1311 with spaces as billing", () => { |
19 | 25 | const raw = '{"code": 1311, "message": "model not on plan"}'; |
20 | 26 | expect(isBillingErrorMessage(raw)).toBe(true); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -204,6 +204,8 @@ const ERROR_PATTERNS = {
|
204 | 204 | "账户已欠费", |
205 | 205 | // Z.ai: error 1311 = model not included in current subscription plan (#48988) |
206 | 206 | ZAI_BILLING_CODE_1311_RE, |
| 207 | +/\bcurrent\s+subscription\s+plan\b.*\b(?:does\s+not|doesn't|not)\b.*\binclude\s+access\b/i, |
| 208 | +/\bmodel\b.*\bnot\s+available\b.*\bcurrent\s+plan\b/i, |
207 | 209 | ], |
208 | 210 | authPermanent: HIGH_CONFIDENCE_AUTH_PERMANENT_PATTERNS, |
209 | 211 | auth: [ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。