Skip to content

Commit 4d0be20

Browse files
committed
test(translator): unlist the catalog-fallback fixture — master now pins glm-5.3-flash
Merge of master (1646a4c 'feat(models): advertise glm-5.3-flash') invalidated the premise that glm-5.3-flash is absent from the pinned catalog: the fixture now resolves the model-aware default (128,000) instead of the generic 4096. - Point the unlisted-family fixture at a genuinely unlisted id (glm-5.3-air), preserving the original intent: the effort channel is keyed off the model id, not catalog membership. - Pin the new catalog reality: glm-5.3-flash gets the same model-aware default as glm-5.3 (max_tokens 128,000, max-effort budget 32,000).
1 parent b11ddc1 commit 4d0be20

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

‎src/translator/openai-to-anthropic.test.ts‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,11 +626,12 @@ describe("translateRequestOpenAIToAnthropic", () => {
626626

627627
// The effort channel is keyed off the model id, not off catalog membership,
628628
// so it keeps working for a family member the pinned catalog does not list
629-
// (glm-5.3-flash is one today). Only the max_tokens fallback consults the
630-
// catalog, and it degrades to the generic default rather than failing.
631-
it("glm-5.3-flash (absent from the pinned catalog) still gets the effort channel, with the generic max_tokens fallback", () => {
629+
// (glm-5.3-flash used to be one until master pinned it). Only the
630+
// max_tokens fallback consults the catalog, and it degrades to the generic
631+
// default rather than failing.
632+
it("an unlisted GLM-5.3-family id still gets the effort channel, with the generic max_tokens fallback", () => {
632633
const req: OpenAIChatRequest = {
633-
model: "glm-5.3-flash",
634+
model: "glm-5.3-air",
634635
messages: [{ role: "user", content: "Hi" }],
635636
reasoning_effort: "max",
636637
};
@@ -643,6 +644,20 @@ describe("translateRequestOpenAIToAnthropic", () => {
643644
expect(result.thinking).toEqual({ type: "enabled", budget_tokens: 4096 - 1024 });
644645
});
645646

647+
it("glm-5.3-flash (pinned since master advertised it) gets the same model-aware default as glm-5.3", () => {
648+
const req: OpenAIChatRequest = {
649+
model: "glm-5.3-flash",
650+
messages: [{ role: "user", content: "Hi" }],
651+
reasoning_effort: "max",
652+
};
653+
654+
const result = translateRequestOpenAIToAnthropic(req);
655+
656+
expect(result.output_config).toEqual({ effort: "max" });
657+
expect(result.max_tokens).toBe(128_000);
658+
expect(result.thinking).toEqual({ type: "enabled", budget_tokens: 32_000 });
659+
});
660+
646661
it("a GLM-5.3-family id absent from the catalog falls back to the generic 4096 default, not a crash", () => {
647662
const req: OpenAIChatRequest = {
648663
model: "glm-5.3-unlisted-variant",

0 commit comments

Comments
 (0)