fix(ai): add glm-5.3 to qwen-token-plan-individual models (#11785)

`qwen-token-plan-individual` filters the models.dev `alibaba-token-plan`
catalog through a fixed list of model IDs. That list still stopped at
`glm-5.2`. models.dev now has `glm-5.3`, and `qwen-token-plan` and
`qwen-token-plan-cn` already list it. Individual did not, because
`glm-5.3` was not on its list.

This change adds `glm-5.3` to the Individual list and updates the
"verified" date in the comment above it.

Tests in `packages/ai/test/qwen-token-plan-models.test.ts`:
- `glm-5.3` is added to the expected list for the exact-list test.
- A new test checks that Individual's `glm-5.3` uses the international
Token Plan base URL. It also checks the thinking levels models.dev gives
for it: low, high and max.

How I tested it:
- `npm run generate-models`, then `test/qwen-token-plan-models.test.ts`:
all 90 tests pass. Without the change to the list, 3 tests fail.
- `npm run check` passes.
- Before: `pi --list-models qwen-token-plan-individual` listed `glm-5.2`
but not `glm-5.3`. After: it lists both.

Fixes #11658

Requested by @badlogic

Co-authored-by: triagent <triagent@localhost>
This commit is contained in:
robopipi[bot] 2026-11-04 09:54:48 +01:00 • committed by GitHub
parent 4c992154d9
commit d53980fe11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -2,7 +2,7 @@ import { assertExactModelIds } from "../../scripts/model-data.ts";
import { defineProvider } from "../define.ts"; import { defineProvider } from "../define.ts";
import { INTERNATIONAL_BASE_URL, QWEN_COMPLETIONS_COMPAT, qwenTokenPlanModels } from "./qwen-token-plan.ts"; import { INTERNATIONAL_BASE_URL, QWEN_COMPLETIONS_COMPAT, qwenTokenPlanModels } from "./qwen-token-plan.ts";
// QwenCloud Token Plan Individual text-model allowlist, verified 2026-09-03. // QwenCloud Token Plan Individual text-model allowlist, verified 2026-11-01.
// It shares the international endpoint with a narrower catalog. // It shares the international endpoint with a narrower catalog.
// https://docs.qwencloud.com/token-plan/personal/token-plan-personal-overview // https://docs.qwencloud.com/token-plan/personal/token-plan-personal-overview
const MODEL_IDS = new Set<string>([ const MODEL_IDS = new Set<string>([
@ -10,6 +10,7 @@ const MODEL_IDS = new Set<string>([
"deepseek-v4-pro", "deepseek-v4-pro",
"deepseek-v4-pro-0813", "deepseek-v4-pro-0813",
"glm-5.2", "glm-5.2",
"glm-5.3",
"qwen3.6-flash", "qwen3.6-flash",
"qwen3.7-max", "qwen3.7-max",
"qwen3.7-plus", "qwen3.7-plus",

View file

@ -63,6 +63,7 @@ const INDIVIDUAL_TEXT_MODELS = [
"deepseek-v4-pro", "deepseek-v4-pro",
"deepseek-v4-pro-0813", "deepseek-v4-pro-0813",
"glm-5.2", "glm-5.2",
"glm-5.3",
"qwen3.6-flash", "qwen3.6-flash",
"qwen3.7-max", "qwen3.7-max",
"qwen3.7-plus", "qwen3.7-plus",
@ -199,6 +200,22 @@ describe("Qwen Token Plan models", () => {
}, },
); );
it("exposes glm-5.3 reasoning_effort levels for qwen-token-plan-individual", () => {
const model = getModels("qwen-token-plan-individual").find((candidate) => candidate.id === "glm-5.3");
expect(model).toBeDefined();
if (!model) throw new Error("Missing model: qwen-token-plan-individual/glm-5.3");
expect(model.baseUrl).toBe("https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1");
expect(model.thinkingLevelMap).toMatchObject({
minimal: null,
low: "low",
medium: null,
high: "high",
xhigh: null,
max: "max",
});
});
it.each(QWEN38_MODEL_CASES)( it.each(QWEN38_MODEL_CASES)(
"exposes qwen3.8 reasoning_effort levels for $provider/$modelId", "exposes qwen3.8 reasoning_effort levels for $provider/$modelId",
({ provider, modelId }) => { ({ provider, modelId }) => {