From b3d954dbe44a782e0fc2e848e56c3bcd986ac323 Mon Sep 17 00:00:00 2001 From: Oliver Mee <102673257+oliver-mee@users.noreply.github.com> Date: Fri, 18 Sep 2026 11:02:33 +0800 Subject: [PATCH] fix(providers): restore glm-5.3 to both Alibaba Token Plan catalogs The 260909 refresh removed glm-5.3 as a phantom (the gateway 404'd the id then). It is real now: /models lists it for global Team, global Personal, and CN Team from 260917, and it answers completions on a Personal key (probed 260918). Contract on the plan gateway: effort low/high/max (default max), thinking always-on (enable_thinking:false rejected with 400), 1M context, 131,072 max output, text-only input, strict json_schema accepted. glm-5.3-flash stays out: still never served by the plan. Evidence: https://github.com/oliver-mee/alibaba-token-plan-wiki (machine-readable catalogue, data/models.json, updated 2026-09-18). --- src/providers/registry/entries-extended.ts | 2 ++ src/providers/registry/model-seeds.ts | 25 ++++++++++++------- tests/gui/alibaba-intl-token-plan.test.ts | 23 +++++++++++------ .../provider-registry-parity.test.ts | 5 ++-- 4 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/providers/registry/entries-extended.ts b/src/providers/registry/entries-extended.ts index 068d5087a2..11f7a3e8fe 100644 --- a/src/providers/registry/entries-extended.ts +++ b/src/providers/registry/entries-extended.ts @@ -802,6 +802,7 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [ ...Object.fromEntries(ALIBABA_TOKEN_PLAN_QWEN_MODELS.map(id => [id, THINKING_BUDGET_EFFORTS])), ...Object.fromEntries(QWEN38_FAMILY.map(id => [id, QWEN38_REASONING_EFFORTS])), "glm-5.2": ZAI_GLM_52_REASONING_EFFORTS, + "glm-5.3": ZAI_GLM_53_REASONING_EFFORTS, "deepseek-v4-pro": deepseekThinkingEffortsFor("deepseek-v4-pro"), "deepseek-v4-pro-0813": deepseekThinkingEffortsFor("deepseek-v4-pro-0813"), "deepseek-v4-flash-0731": deepseekThinkingEffortsFor("deepseek-v4-flash-0731"), @@ -847,6 +848,7 @@ export const PROVIDER_REGISTRY_EXTENDED: readonly ProviderRegistryEntry[] = [ ...Object.fromEntries(ALIBABA_INTL_TOKEN_PLAN_QWEN_MODELS.map(id => [id, THINKING_BUDGET_EFFORTS])), ...Object.fromEntries(QWEN38_FAMILY.map(id => [id, QWEN38_REASONING_EFFORTS])), "glm-5.2": ZAI_GLM_52_REASONING_EFFORTS, + "glm-5.3": ZAI_GLM_53_REASONING_EFFORTS, "deepseek-v4-pro": deepseekThinkingEffortsFor("deepseek-v4-pro"), "deepseek-v4-pro-0813": deepseekThinkingEffortsFor("deepseek-v4-pro-0813"), "deepseek-v4-flash": deepseekThinkingEffortsFor("deepseek-v4-flash"), diff --git a/src/providers/registry/model-seeds.ts b/src/providers/registry/model-seeds.ts index f18b73cb57..7e0f07b7e2 100644 --- a/src/providers/registry/model-seeds.ts +++ b/src/providers/registry/model-seeds.ts @@ -439,9 +439,15 @@ export const deepseekReasoningMapFor = (modelId: string): Record // https://help.aliyun.com/en/model-studio/token-plan-quickstart // 260909 refresh, re-probed against the live gateway (both regions, both tiers): // https://github.com/oliver-mee/alibaba-token-plan-wiki (machine-readable catalog). -// glm-5.3 / glm-5.3-flash removed from both Token Plan catalogs: they exist on Z.AI -// endpoints but the Token Plan gateway has never served either id (the 260826 seed -// propagated them across every GLM-carrying catalog; a selected row 404s). +// 260918: glm-5.3 returns. The 260909 removal was correct at the time (the id +// 404'd on every plan key), but the gateway started serving glm-5.3 on 260917: +// it now appears on /models for global Team, global Personal, and CN Team, and +// answers a completion on a Personal key (probed 260918). Contract on the plan +// gateway: effort low/high/max (default max), thinking always-on (the gateway +// rejects enable_thinking:false with 400), 1M context, 131,072 max output, +// text-only input, strict json_schema accepted. glm-5.3-flash REMAINS OUT: +// still never served by the Token Plan gateway (docs.z.ai VLM id, not plan +// entitlement). // The Beijing preset keeps the Personal Edition subset; non-chat ids (audio/image/ // video families) stay out: they answer only on async endpoints openai-chat cannot // reach. deepseek-v4-pro-0813 is callable but NOT listed by /models, which is the @@ -457,7 +463,7 @@ export const deepseekReasoningMapFor = (modelId: string): Record // drifting ones. export const ALIBABA_TOKEN_PLAN_MODELS = [ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-flash", - "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", + "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", "glm-5.3", ]; export const ALIBABA_TOKEN_PLAN_QWEN_MODELS = [ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-flash", @@ -474,6 +480,7 @@ export const ALIBABA_TOKEN_PLAN_INPUT_MODALITIES: Record = { // Vision probed on the plan gateway 260915 (user message and tool result, both 200). "deepseek-v4.1-flash": ["text", "image"], "glm-5.2": ["text"], + "glm-5.3": ["text"], }; // 260721 Alibaba Token Plan International (ap-southeast-1 / Singapore, hardened 260721). @@ -487,7 +494,7 @@ export const ALIBABA_INTL_TOKEN_PLAN_MODELS = [ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-plus", "qwen3.6-flash", "deepseek-v4-pro", "deepseek-v4-pro-0813", "deepseek-v4-flash", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "deepseek-v3.2", "kimi-k2.7-code", "kimi-k2.6", "kimi-k2.5", - "glm-5.2", "glm-5.1", "glm-5", + "glm-5.2", "glm-5.3", "glm-5.1", "glm-5", "MiniMax-M2.5", ]; export const ALIBABA_INTL_TOKEN_PLAN_QWEN_MODELS = [ @@ -589,7 +596,7 @@ export const ALIBABA_TOKEN_PLAN_CONTEXT_WINDOWS: Record = { "deepseek-v4-pro": 1_000_000, "deepseek-v4-pro-0813": 1_000_000, "deepseek-v4-flash": 1_000_000, "deepseek-v4-flash-0731": 1_000_000, "deepseek-v4.1-flash": 1_000_000, "deepseek-v3.2": 131_072, "kimi-k2.7-code": 262_144, "kimi-k2.6": 262_144, "kimi-k2.5": 262_144, - "glm-5.2": 1_000_000, "glm-5.1": 202_752, "glm-5": 202_752, + "glm-5.2": 1_000_000, "glm-5.3": 1_000_000, "glm-5.1": 202_752, "glm-5": 202_752, "MiniMax-M2.5": 196_608, }; export const ALIBABA_TOKEN_PLAN_MAX_OUTPUT_TOKENS: Record = { @@ -598,17 +605,17 @@ export const ALIBABA_TOKEN_PLAN_MAX_OUTPUT_TOKENS: Record = { "deepseek-v4-pro": 393_216, "deepseek-v4-pro-0813": 393_216, "deepseek-v4-flash": 393_216, "deepseek-v4-flash-0731": 393_216, "deepseek-v4.1-flash": 393_216, "deepseek-v3.2": 65_536, "kimi-k2.7-code": 262_144, "kimi-k2.6": 262_144, "kimi-k2.5": 98_304, - "glm-5.2": 131_072, "glm-5.1": 128_000, "glm-5": 16_384, + "glm-5.2": 131_072, "glm-5.3": 131_072, "glm-5.1": 128_000, "glm-5": 16_384, "MiniMax-M2.5": 32_768, }; export const ALIBABA_TOKEN_PLAN_NO_VISION = [ "qwen3.7-max", "deepseek-v4-pro", "deepseek-v4-pro-0813", "deepseek-v4-flash", - "deepseek-v4-flash-0731", "deepseek-v3.2", "glm-5.2", "glm-5.1", "glm-5", "MiniMax-M2.5", + "deepseek-v4-flash-0731", "deepseek-v3.2", "glm-5.2", "glm-5.3", "glm-5.1", "glm-5", "MiniMax-M2.5", ]; export const ALIBABA_TOKEN_PLAN_PRESERVE_REASONING = [ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-plus", "qwen3.6-flash", "deepseek-v4-pro", "deepseek-v4-pro-0813", "deepseek-v4-flash", "deepseek-v4-flash-0731", - "deepseek-v4.1-flash", "glm-5.2", + "deepseek-v4.1-flash", "glm-5.2", "glm-5.3", ]; // 260717 Kimi K3: the subscription endpoint uses one upstream id (`k3`) for both diff --git a/tests/gui/alibaba-intl-token-plan.test.ts b/tests/gui/alibaba-intl-token-plan.test.ts index e10459e15c..f645235804 100644 --- a/tests/gui/alibaba-intl-token-plan.test.ts +++ b/tests/gui/alibaba-intl-token-plan.test.ts @@ -42,12 +42,18 @@ describe("alibaba-token-plan-intl registry entry", () => { expect(entry!.models).toContain("deepseek-v4-flash-0731"); // DeepSeek's 260910 rename row: listed on /models from 260915 on both tiers. expect(entry!.models).toContain("deepseek-v4.1-flash"); - // GLM-5.3 and GLM-5.3-flash exist on Z.AI endpoints but NOT on Token Plan: the - // 260826 seed commit propagated them across every GLM-carrying catalog. Either - // row 404s here (probed 260907 and 260909, both regions and both tiers). - expect(entry!.models).not.toContain("glm-5.3"); + // GLM-5.3 joined the plan gateway on 260917: listed on /models for global + // Team, global Personal, and CN Team, and callable on a Personal key (probed + // 260918), so it is restored to both Token Plan rosters. + expect(entry!.models).toContain("glm-5.3"); + expect(entry!.modelReasoningEfforts?.["glm-5.3"]).toEqual(["low", "high", "max"]); + expect(entry!.modelContextWindows?.["glm-5.3"]).toBe(1_000_000); + expect(entry!.modelMaxOutputTokens?.["glm-5.3"]).toBe(131_072); + expect(entry!.modelInputModalities?.["glm-5.3"]).toEqual(["text"]); + expect(entry!.preserveReasoningContentModels).toContain("glm-5.3"); + // GLM-5.3-flash remains a phantom: still never served by the Token Plan gateway. expect(entry!.models).not.toContain("glm-5.3-flash"); - expect(entry!.models!.length).toBe(19); + expect(entry!.models!.length).toBe(20); }); test("MiniMax case-insensitive normalization is set", () => { @@ -170,11 +176,12 @@ describe("alibaba-token-plan-intl registry entry", () => { expect(entry!.promptCacheKey).toBe(true); const cn = PROVIDER_REGISTRY.find(e => e.id === "alibaba-token-plan"); expect(cn!.promptCacheKey).toBe(true); - // Beijing roster pinned exactly (Personal Edition subset), including phantom absence. + // Beijing roster pinned exactly (Personal Edition subset; glm-5.3 Personal- + // entitled from its 260917 first listing, probed callable on a Personal key). const cnModels = PROVIDER_REGISTRY.find(e => e.id === "alibaba-token-plan")!.models; expect(cnModels).toEqual([ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-flash", - "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", + "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", "glm-5.3", ]); // The 260910 DeepSeek rename row is wired: vision-capable, effort ladder, and the // json_schema downgrade the plan gateway needs (probed 260915). @@ -186,7 +193,7 @@ describe("alibaba-token-plan-intl registry entry", () => { expect(v41.modelContextWindows?.["deepseek-v4.1-flash"]).toBe(1_000_000); expect(v41.preserveReasoningContentModels).toContain("deepseek-v4.1-flash"); expect(v41.noVisionModels).not.toContain("deepseek-v4.1-flash"); - expect(cnModels).not.toContain("glm-5.3"); + expect(cnModels).toContain("glm-5.3"); expect(cnModels).not.toContain("glm-5.3-flash"); // providerConfigSeed and enrichProviderFromRegistry are the two paths that carry // the flag from the registry into a live provider config. diff --git a/tests/providers/provider-registry-parity.test.ts b/tests/providers/provider-registry-parity.test.ts index 21ff647de0..c6cdff0e24 100644 --- a/tests/providers/provider-registry-parity.test.ts +++ b/tests/providers/provider-registry-parity.test.ts @@ -402,7 +402,7 @@ describe("provider registry parity", () => { liveModels: false, models: [ "qwen3.8-max", "qwen3.8-flash", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-flash", - "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", + "deepseek-v4-pro", "deepseek-v4-flash-0731", "deepseek-v4.1-flash", "glm-5.2", "glm-5.3", ], modelInputModalities: { "qwen3.8-max": ["text", "image"], @@ -423,7 +423,8 @@ describe("provider registry parity", () => { }, noVisionModels: expect.arrayContaining(["qwen3.7-max", "deepseek-v4-pro", "glm-5.2"]), // Beijing is the Personal Edition roster: the Team-only 0813 snapshot and the - // phantom glm-5.3 pair must stay out of this preset's models list. + // still-phantom glm-5.3-flash must stay out of this preset's models list. + // glm-5.3 itself joined the plan on 260917 and is Personal-entitled (probed 260918). preserveReasoningContentModels: expect.arrayContaining(["qwen3.8-max", "qwen3.7-max", "qwen3.7-plus"]), });