diff --git a/CHANGELOG.md b/CHANGELOG.md index df3a32108..384002d3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,12 @@ file is the human-readable summary of what changed and why. ### Gateway +- **GLM-5.3-Flash gets its served window** — the model is served with the same + 262,144-token window as MiniMax-M3, so it now has its own entry in the + built-in table instead of falling back to the safe 200K default. Signing in + (or re-running a configure flow) writes it the same context gauge and + compaction trigger the other large model gets; already-written configs are + not rewritten. - **The SSO provider is now AIGW** — signing in with SSO writes the gateway provider as `aigw`, shown as "AIGW" in the model picker, replacing the previous identity. Existing installs keep working: the old provider id stays diff --git a/packages/codev-gateway/src/model-limits.ts b/packages/codev-gateway/src/model-limits.ts index 2bca0e9ab..30d8c244d 100644 --- a/packages/codev-gateway/src/model-limits.ts +++ b/packages/codev-gateway/src/model-limits.ts @@ -32,13 +32,14 @@ export const COMPACT_RESERVED = 40000 export const COMPACT_PCT = 90 // Known gateway models' context windows, keyed by the exact id `/v1/models` -// reports. M3's window is capped at 262144 on the current deployment (the -// model supports more, the gateway's resources don't). The 200K sibling is -// deliberately absent: DEFAULT_WINDOW already describes it, and an entry -// restating the default is one more thing to keep in sync. +// reports. M3's and GLM-5.3-Flash's windows are capped at 262144 on the current +// deployment (the models support more, the gateway's resources don't). Models +// served at the 200K default are deliberately absent: DEFAULT_WINDOW already +// describes them, and an entry restating the default is one more thing to keep +// in sync. const TABLE: Record = { "MiniMax/MiniMax-M3": 262144, - "zai-org/GLM-4.7-cc": 200000, + "zai-org/GLM-5.3-Flash": 262144, } // Unrecognized models are treated as 200K-class: it matches the smaller of the diff --git a/packages/codev-gateway/test/config-block.test.ts b/packages/codev-gateway/test/config-block.test.ts index ef5bf4b2c..11a9c3cc7 100644 --- a/packages/codev-gateway/test/config-block.test.ts +++ b/packages/codev-gateway/test/config-block.test.ts @@ -72,16 +72,18 @@ describe("buildGatewayConfig", () => { }) }) - // The per-model table: M3's 262144-token window (capped by the deployment, + // The per-model table: the 262144-token window (capped by the deployment, // not the model). Its 90% trigger + the 40000 reserve exceeds the window, // so declaredInput's clamp pins input at the window itself. - test("writes the table window for the known model", () => { - const config = buildGatewayConfig({ baseUrl: "https://gw.test", model: "MiniMax/MiniMax-M3" }) - expect(config.provider.aigw.models["MiniMax/MiniMax-M3"].limit).toEqual({ - context: 262144, - input: 262144, - output: 65536, - }) + test("writes the table window for the known models", () => { + for (const id of ["MiniMax/MiniMax-M3", "zai-org/GLM-5.3-Flash"]) { + const config = buildGatewayConfig({ baseUrl: "https://gw.test", model: id }) + expect(config.provider.aigw.models[id].limit).toEqual({ + context: 262144, + input: 262144, + output: 65536, + }) + } }) // Without the declaration a custom-provider model resolves to text-only and diff --git a/packages/codev-gateway/test/model-limits.test.ts b/packages/codev-gateway/test/model-limits.test.ts index 85cd146e7..0e17302fa 100644 --- a/packages/codev-gateway/test/model-limits.test.ts +++ b/packages/codev-gateway/test/model-limits.test.ts @@ -36,7 +36,7 @@ describe("limitsFor", () => { test("resolves the table's known models and defaults the rest", () => { // Triggers are always 90% of the window, whatever its source. expect(limitsFor("MiniMax/MiniMax-M3")).toEqual({ context: 262144, trigger: 235930 }) - expect(limitsFor("zai-org/GLM-4.7-cc")).toEqual({ context: 200000, trigger: 180000 }) + expect(limitsFor("zai-org/GLM-5.3-Flash")).toEqual({ context: 262144, trigger: 235930 }) expect(limitsFor("anything/else")).toEqual(DEFAULT_LIMITS) expect(DEFAULT_LIMITS).toEqual({ context: 200000, trigger: 180000 }) })