Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,10 @@ export const providers = {
"glm-flash": {
displayName: "GLM Flash",
resolve: "opencode-go/glm-5.3-flash",
effort: ["low", "high", "max"],
// The Go endpoint rejected reasoning_effort=high during PR review #964
// (run 36464251799), despite models.dev advertising this ladder.
Comment thread
AojdevStudio marked this conversation as resolved.
Outdated
effort: [],
openRouterEffort: ["low", "high", "max"],
openRouterResolve: "openrouter/z-ai/glm-5.3-flash",
},
// legacy alias — the slug pinned a version instead of a brand tier and
Expand Down
6 changes: 6 additions & 0 deletions test/models-catalog.main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ describe("effort ladders mirror published catalogs", async () => {
if (alias.routing || alias.fallback) continue;

it(`${alias.slug} effort matches its published catalog`, () => {
// The Go GLM Flash endpoint rejects reasoning_effort even though models.dev
// lists effort rungs; preserve the observed transport contract until fixed.
if (alias.slug === "opencode-go/glm-flash") {
expect(alias.effort).toEqual([]);
return;
}
expect(rungs(publishedEffort(alias.resolve))).toEqual(rungs(alias.effort));
});

Expand Down
8 changes: 8 additions & 0 deletions test/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ describe("GPT Astra routing and effort", () => {
});
});

describe("OpenCode Go GLM Flash effort", () => {
it("omits direct effort while retaining the OpenRouter ladder", () => {
const slug = "opencode-go/glm-flash";
expect(resolveModelRung({ slug, useOpenRouter: false, position: 0.5 })).toBeUndefined();
expect(resolveModelRung({ slug, useOpenRouter: true, position: 0.5 })).toBe("high");
});
});

// ── pure alias-registry invariants ──────────────────────────────────────────────
//
// these tests validate our alias data structure without hitting external APIs.
Expand Down