Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/providers/registry/entries-extended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down
25 changes: 16 additions & 9 deletions src/providers/registry/model-seeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,15 @@ export const deepseekReasoningMapFor = (modelId: string): Record<string, string>
// 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
Expand All @@ -457,7 +463,7 @@ export const deepseekReasoningMapFor = (modelId: string): Record<string, string>
// 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",
Expand All @@ -474,6 +480,7 @@ export const ALIBABA_TOKEN_PLAN_INPUT_MODALITIES: Record<string, string[]> = {
// 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).
Expand All @@ -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 = [
Expand Down Expand Up @@ -589,7 +596,7 @@ export const ALIBABA_TOKEN_PLAN_CONTEXT_WINDOWS: Record<string, number> = {
"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<string, number> = {
Expand All @@ -598,17 +605,17 @@ export const ALIBABA_TOKEN_PLAN_MAX_OUTPUT_TOKENS: Record<string, number> = {
"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
Expand Down
23 changes: 15 additions & 8 deletions tests/gui/alibaba-intl-token-plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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).
Expand All @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions tests/providers/provider-registry-parity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"]),
});
Expand Down
Loading