fix: Inconsistent radix for limit.context on Zhipu GLM models (200K stored as both 200000 and 204800) - #3740
Open
github-actions[bot] wants to merge 1 commit into
Open
fix: Inconsistent radix for limit.context on Zhipu GLM models (200K stored as both 200000 and 204800)#3740github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…tored as both 200000 and 204800)
Collaborator
|
/oc review this PR |
Contributor
PR Review: fix Zhipu GLM
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Normalized Zhipu/Z.AI GLM
limit.contextto the binary convention used by the platform’s own precise configs and max-token table.Z.AI marketing docs say
200K/128K, but first-party machine-readable values use 204800 and 131072 (andmax_tokensis already binary: 131072 / 98304 / 32768). Several catalog entries already used binary; others used decimal. This aligns the remainingzhipuai/zaientries.Changes
limit.contextold → newglm-5.1200000/200_000→204800/204_800glm-5-turbo200000/200_000→204800/204_800glm-5v-turbo200000/200_000→204800/204_800glm-4.7-flash200_000→204_800glm-4.7-flashx200_000→204_800glm-4.6v128000/128_000→131072/131_072Unchanged (already binary / correct):
glm-5,glm-4.7,glm-4.6→204800glm-4.5series →131072glm-5.2→1000000(docs use decimal1M/1000000)limit.outputvalues (already binary)Files:
models/zhipuai/*plus inline provider copies underproviders/zai/andproviders/zhipuai/.providers/zaimodels that only usebase_model(glm-5.1,glm-5,glm-5.2) inherit the base-model fix.Evidence
"contextWindow": 204800forglm-5.1,glm-5,glm-4.7max_tokenstable: 131072, 98304, 32768, 16384glm-4.5*context = 131_072Note: Cline setup text on the same docs page says “Set Context Window Size to 200000” — rounded UI guidance. Precise OpenClaw JSON uses 204800.
Validation
200000/128000context values undermodels/zhipuai,providers/zai, orproviders/zhipuai.bun validateor live API tests.Review notes
max_tokenstable are binary, and the API error cites 204800.zhipuai/zai.glm-4.6v-flashsymlink (flagged as pre-existing/unrelated).limit.inputfields present yet; nothing to recompute for that.Closes #3738
Automated by the issue fixer: https://github.com/anomalyco/models.dev/actions/runs/30154315832