feat(models): add GLM-5.2 with 1M context window - #45806
Closed
hetdev wants to merge 1 commit into
Closed
Conversation
GLM-5.2 (Zhipu/z.ai) ships with a truly usable 1M-token context window, a significant upgrade from the 200K window of GLM-5/5.1. Changes: - model_metadata.py: add "glm-5.2": 1000000 entry (substring matching longest-first ensures it wins over the generic "glm": 202752 catch-all) - models.py: register glm-5.2 in OPENROUTER_MODELS, _PROVIDER_MODELS curated list, and the "zai" provider model list Source: https://docs.z.ai/guides/llm/glm-5 (GLM-5.2 announcement)
Contributor
|
Thanks for jumping on GLM-5.2. We merged the broader GLM-5.2 support via #45695, preserving @am423's authorship in git history: That landed the 1M context metadata plus the Z.AI model picker/setup/auth probing/fallback surfaces, so this PR is now covered. Closing as duplicate, with appreciation for helping validate the same issue. |
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
GLM-5.2 (Zhipu/z.ai) is now available and ships with a truly usable 1M-token context window — a significant upgrade from the 200K window of GLM-5/5.1. This PR registers the model across all relevant surfaces.
Changes
agent/model_metadata.py"glm-5.2": 1000000toKNOWN_CONTEXT_LENGTHS. The longest-first substring matching ensures this entry wins over the generic"glm": 202752catch-all.hermes_cli/models.py(3 locations)OPENROUTER_MODELS: addz-ai/glm-5.2_PROVIDER_MODELScurated list: addz-ai/glm-5.2_PROVIDER_MODELS["zai"]: addglm-5.2Source
Verification