feat(zai): update glm-5 model specs with correct pricing, context window, and max output tokens

- International: input $1.00, output $3.20, cached $0.20 per 1M tokens (per z.ai docs)
- Mainland: proportionally scaled pricing based on existing model ratios
- Context window: 200k tokens (was 202,752)
- Max output tokens: 128k (was 16,384)
- Updated test expectations to match new contextWindow value

Closes #11438
This commit is contained in:
Roo Code 2026-02-12 19:26:54 +00:00
parent b7857bcd6a
commit 0e09ca72ed
2 changed files with 14 additions and 14 deletions

View file

@ -121,19 +121,19 @@ export const internationalZAiModels = {
"GLM-4.7 is Zhipu's latest model with built-in thinking capabilities enabled by default. It provides enhanced reasoning for complex tasks while maintaining fast response times.",
},
"glm-5": {
maxTokens: 16_384,
contextWindow: 202_752,
maxTokens: 128_000,
contextWindow: 200_000,
supportsImages: false,
supportsPromptCache: true,
supportsReasoningEffort: ["disable", "medium"],
reasoningEffort: "medium",
preserveReasoning: true,
inputPrice: 0.6,
outputPrice: 2.2,
inputPrice: 1.0,
outputPrice: 3.2,
cacheWritesPrice: 0,
cacheReadsPrice: 0.11,
cacheReadsPrice: 0.2,
description:
"GLM-5 is Zhipu's next-generation model with a 202k context window and built-in thinking capabilities. It delivers state-of-the-art reasoning, coding, and agentic performance.",
"GLM-5 is Zhipu's next-generation model with a 200k context window, 128k max output, and built-in thinking capabilities. It delivers state-of-the-art reasoning, coding, and agentic performance.",
},
"glm-4.7-flash": {
maxTokens: 16_384,
@ -297,19 +297,19 @@ export const mainlandZAiModels = {
"GLM-4.7 is Zhipu's latest model with built-in thinking capabilities enabled by default. It provides enhanced reasoning for complex tasks while maintaining fast response times.",
},
"glm-5": {
maxTokens: 16_384,
contextWindow: 202_752,
maxTokens: 128_000,
contextWindow: 200_000,
supportsImages: false,
supportsPromptCache: true,
supportsReasoningEffort: ["disable", "medium"],
reasoningEffort: "medium",
preserveReasoning: true,
inputPrice: 0.29,
outputPrice: 1.14,
inputPrice: 0.48,
outputPrice: 1.66,
cacheWritesPrice: 0,
cacheReadsPrice: 0.057,
cacheReadsPrice: 0.1,
description:
"GLM-5 is Zhipu's next-generation model with a 202k context window and built-in thinking capabilities. It delivers state-of-the-art reasoning, coding, and agentic performance.",
"GLM-5 is Zhipu's next-generation model with a 200k context window, 128k max output, and built-in thinking capabilities. It delivers state-of-the-art reasoning, coding, and agentic performance.",
},
"glm-4.7-flash": {
maxTokens: 16_384,

View file

@ -131,7 +131,7 @@ describe("ZAiHandler", () => {
const model = handlerWithModel.getModel()
expect(model.id).toBe(testModelId)
expect(model.info).toEqual(internationalZAiModels[testModelId])
expect(model.info.contextWindow).toBe(202_752)
expect(model.info.contextWindow).toBe(200_000)
expect(model.info.supportsReasoningEffort).toEqual(["disable", "medium"])
expect(model.info.reasoningEffort).toBe("medium")
expect(model.info.preserveReasoning).toBe(true)
@ -230,7 +230,7 @@ describe("ZAiHandler", () => {
const model = handlerWithModel.getModel()
expect(model.id).toBe(testModelId)
expect(model.info).toEqual(mainlandZAiModels[testModelId])
expect(model.info.contextWindow).toBe(202_752)
expect(model.info.contextWindow).toBe(200_000)
expect(model.info.supportsReasoningEffort).toEqual(["disable", "medium"])
expect(model.info.reasoningEffort).toBe("medium")
expect(model.info.preserveReasoning).toBe(true)