mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-29 18:05:16 +00:00
fix(live): classify Z.ai plan denials as billing drift
This commit is contained in:
@@ -15,6 +15,12 @@ describe("Z.ai vendor error codes (#48988)", () => {
|
||||
expect(isBillingErrorMessage(raw)).toBe(true);
|
||||
});
|
||||
|
||||
it("classifies prose-only subscription plan access denials as billing", () => {
|
||||
const raw =
|
||||
"FailoverError: Your current subscription plan does not yet include access to GLM-5V-Turbo";
|
||||
expect(isBillingErrorMessage(raw)).toBe(true);
|
||||
});
|
||||
|
||||
it("classifies Z.ai 1311 with spaces as billing", () => {
|
||||
const raw = '{"code": 1311, "message": "model not on plan"}';
|
||||
expect(isBillingErrorMessage(raw)).toBe(true);
|
||||
|
||||
@@ -204,6 +204,8 @@ const ERROR_PATTERNS = {
|
||||
"账户已欠费",
|
||||
// Z.ai: error 1311 = model not included in current subscription plan (#48988)
|
||||
ZAI_BILLING_CODE_1311_RE,
|
||||
/\bcurrent\s+subscription\s+plan\b.*\b(?:does\s+not|doesn't|not)\b.*\binclude\s+access\b/i,
|
||||
/\bmodel\b.*\bnot\s+available\b.*\bcurrent\s+plan\b/i,
|
||||
],
|
||||
authPermanent: HIGH_CONFIDENCE_AUTH_PERMANENT_PATTERNS,
|
||||
auth: [
|
||||
|
||||
Reference in New Issue
Block a user