Skip to content

Commit 46e197e

Browse files
committed
Fix: glm-5.3-flash is a 1M-context model, not 200K
Its specs were pinned as conservative placeholders because the model is absent from ZCode's bundled catalog snapshot, which predates it. Z.AI's model page is authoritative and says otherwise: Context Length: 1M Maximum Output Tokens: 128K "Text parameters are consistent with GLM-5.3, with support for a 1M-token context window" https://docs.z.ai/guides/vlm/glm-5.3-flash Cross-checked against the GLM-5.3 page, which states the same 1M/128K pair for the model glm-5.3-flash is said to match. The same page also records two things worth capturing in comments: the model is natively multimodal (video / image / text / file input), unlike text-only glm-5.3, and thinking.type accepts only "enabled" — thinking is documented as impossible to disable. That last point contradicts a live measurement, where thinking:{type:"disabled"} returned 200 with no thinking block rather than an error, so the comment records both and says not to rely on the observed behaviour.
1 parent b1809c2 commit 46e197e

3 files changed

Lines changed: 24 additions & 16 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ The proxy lists these models on `GET /v1/models` (pinned to the GLM coding-plan
364364
| `glm-5.1` | 200K | 64K |
365365
| `glm-5.2` | 1M | 128K |
366366
| `glm-5.3` | 1M | 128K |
367-
| `glm-5.3-flash` | 200K | 128K |
367+
| `glm-5.3-flash` | 1M | 128K |
368368
| `glm-4.6v` | 131K | 32K |
369369
| `glm-4.1v-thinking-flash` | 65K | 32K |
370370
| `glm-4-flash-250414` | 131K | 16K |

‎src/provider/models.ts‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,20 @@ export const MODELS: ModelDef[] = [
3232
{ id: "glm-5.1", name: "GLM 5.1", contextWindow: 200_000, maxOutputTokens: 64_000, reasoning: true },
3333
{ id: "glm-5.2", name: "GLM 5.2", contextWindow: 1_000_000, maxOutputTokens: 128_000, reasoning: true },
3434
{ id: "glm-5.3", name: "GLM 5.3", contextWindow: 1_000_000, maxOutputTokens: 128_000, reasoning: true },
35-
// Confirmed available (repo owner + local ZCode entitlement
36-
// ent_wk_0828_glm_5p3f, capabilities: ["model:glm-5.3-flash"]) but absent
37-
// from ZCode's stale v1 catalog snapshot, so contextWindow/maxOutputTokens
38-
// below are conservative placeholders, NOT catalog-sourced — the observed
39-
// gateway max_tokens ceiling is 131_072. Confirmed a reasoning model (183
40-
// chars of thinking by default; effort:"low" or thinking:{type:"disabled"}
41-
// yields 0).
42-
{ id: "glm-5.3-flash", name: "GLM 5.3 Flash", contextWindow: 200_000, maxOutputTokens: 128_000, reasoning: true },
35+
// Absent from ZCode's bundled v1 catalog snapshot, which predates it, so
36+
// these specs come from Z.AI's model page instead:
37+
// https://docs.z.ai/guides/vlm/glm-5.3-flash — "Context Length: 1M",
38+
// "Maximum Output Tokens: 128K", and "text parameters are consistent with
39+
// GLM-5.3, with support for a 1M-token context window". Observed gateway
40+
// max_tokens ceiling is 131_072, above the 128_000 pinned here.
41+
//
42+
// Natively multimodal (video / image / text / file input), unlike glm-5.3
43+
// which is text-only — hence its docs live under /guides/vlm/. Reasoning is
44+
// always on: the docs state thinking.type accepts only "enabled". Measured
45+
// 183 chars of thinking by default, and 0 under effort:"low" — note that
46+
// sending thinking:{type:"disabled"} also measured 0 rather than erroring,
47+
// which the docs say is unsupported; do not rely on it.
48+
{ id: "glm-5.3-flash", name: "GLM 5.3 Flash", contextWindow: 1_000_000, maxOutputTokens: 128_000, reasoning: true },
4349
// Gateway hard-rejects max_tokens above 32_768 for this model:
4450
// `400 [1210] 限制数值范围[1,32768]`, where every sibling allows 131_072. The
4551
// previous 128_000 here was never sent upstream (nothing consumed this field

‎src/provider/providers.test.ts‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ describe("models", () => {
6666
}
6767
});
6868

69-
it("glm-5.2 and glm-5.3 have 1M context", () => {
70-
const glm52 = MODELS.find((m) => m.id === "glm-5.2");
71-
expect(glm52).toBeDefined();
72-
expect(glm52!.contextWindow).toBe(1_000_000);
73-
const glm53 = MODELS.find((m) => m.id === "glm-5.3");
74-
expect(glm53).toBeDefined();
75-
expect(glm53!.contextWindow).toBe(1_000_000);
69+
// glm-5.3-flash is documented at 1M as well — Z.AI's model page states
70+
// "Context Length: 1M" and that its text parameters match glm-5.3.
71+
// https://docs.z.ai/guides/vlm/glm-5.3-flash
72+
it("glm-5.2, glm-5.3 and glm-5.3-flash have 1M context", () => {
73+
for (const id of ["glm-5.2", "glm-5.3", "glm-5.3-flash"]) {
74+
const m = MODELS.find((x) => x.id === id);
75+
expect(m, id).toBeDefined();
76+
expect(m!.contextWindow, id).toBe(1_000_000);
77+
}
7678
});
7779

7880
it("includes key GLM models", () => {

0 commit comments

Comments
 (0)