fix(zai): align remaining pi metadata

This commit is contained in:
Vincent Koc
2026-03-22 17:51:18 -07:00
parent 88859c974f
commit bd28eb9f5b
2 changed files with 32 additions and 11 deletions

View File

@@ -7,8 +7,8 @@ describe("zai model definitions", () => {
id: "glm-5",
reasoning: true,
input: ["text"],
contextWindow: 204800,
maxTokens: 131072,
contextWindow: 202800,
maxTokens: 131100,
cost: ZAI_DEFAULT_COST,
});
});
@@ -29,4 +29,25 @@ describe("zai model definitions", () => {
cost: { input: 0.2, output: 1.1, cacheRead: 0.03, cacheWrite: 0 },
});
});
it("keeps the remaining GLM 4.7/5 pricing and token limits aligned with Pi", () => {
expect(buildZaiModelDefinition({ id: "glm-4.7-flash" })).toMatchObject({
id: "glm-4.7-flash",
cost: { input: 0.07, output: 0.4, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 131072,
});
expect(buildZaiModelDefinition({ id: "glm-4.7-flashx" })).toMatchObject({
id: "glm-4.7-flashx",
cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 128000,
});
expect(buildZaiModelDefinition({ id: "glm-5-turbo" })).toMatchObject({
id: "glm-5-turbo",
contextWindow: 202800,
maxTokens: 131100,
cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 },
});
});
});