feat(zai): update GLM-5 model specs with correct pricing and token limits#11443
feat(zai): update GLM-5 model specs with correct pricing and token limits#11443roomote[bot] wants to merge 1 commit intomainfrom
Conversation
…dow, 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
The international GLM-5 specs look correct per the z.ai docs. One inconsistency found in the mainland entry:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| maxTokens: 16_384, | ||
| contextWindow: 202_752, | ||
| maxTokens: 128_000, | ||
| contextWindow: 200_000, |
There was a problem hiding this comment.
Every other mainland model with a ~200k context window (glm-4.6, glm-4.7, glm-4.7-flash, glm-4.7-flashx) uses contextWindow: 204_800, while their international counterparts use 200_000. Setting mainland GLM-5 to 200_000 breaks this established pattern. Since you already proportionally scaled the pricing to match mainland conventions, the context window likely needs the same treatment. If the bigmodel.cn docs confirm 200k exactly, this is fine -- but worth double-checking.
| contextWindow: 200_000, | |
| contextWindow: 204_800, |
Fix it with Roo Code or mention @roomote and request a fix.
Related GitHub Issue
Closes: #11438
Description
This PR attempts to address Issue #11438 by updating the GLM-5 model entry in the Z.ai provider with correct specs as provided in the issue comments (from z.ai docs).
Changes made:
International (z.ai) GLM-5:
maxTokens: 16,384 -> 128,000 (128k max output per docs)contextWindow: 202,752 -> 200,000 (200k per docs)inputPrice: $0.60 -> $1.00 per 1M tokensoutputPrice: $2.20 -> $3.20 per 1M tokenscacheReadsPrice: $0.11 -> $0.20 per 1M tokensMainland China (bigmodel.cn) GLM-5:
maxTokens: 16,384 -> 128,000contextWindow: 202,752 -> 200,000Other features (already correctly configured):
Feedback and guidance are welcome.
Test Procedure
npx vitest run api/providers/__tests__/zai.spec.tsfromsrc/directory -- all 31 tests passPre-Submission Checklist
Documentation Updates
Additional Notes
The GLM-5 model entry already existed in the codebase but with placeholder values copied from GLM-4.7. This PR corrects those values using the specs provided by @damianar1984 in the issue comments, sourced from the official z.ai documentation.