Skip to content

fix(providers): lower GLM custom provider context#43

Open
zerob13 wants to merge 1 commit into
devfrom
codex/glm-custom-context-200000
Open

fix(providers): lower GLM custom provider context#43
zerob13 wants to merge 1 commit into
devfrom
codex/glm-custom-context-200000

Conversation

@zerob13
Copy link
Copy Markdown
Collaborator

@zerob13 zerob13 commented Jun 2, 2026

Summary

  • Lower custom provider context length for glm-5 and glm-5.1 from 204800 to 200000.
  • Regenerate custom provider outputs in dist/custom-provider.json and dist/all.json.

Verification

  • pnpm build
  • node build/cli.js fetch-all -o dist
  • Verified glm-5 and glm-5.1 custom provider limits are 200000 in source, dist/custom-provider.json, and dist/all.json.

Summary by CodeRabbit

  • Chores
    • Updated context length configuration for Zhipu models glm-5.1 and glm-5, reducing maximum context from 204800 to 200000 tokens.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adjusts the maximum context length configuration for two Zhipu AI models (glm-5.1 and glm-5) in the provider overrides template from 204,800 to 200,000 tokens, reflecting updated platform specifications.

Changes

Zhipu Model Configuration

Layer / File(s) Summary
Zhipu context length corrections
manual-templates/custom-provider-overrides.json
Zhipu models glm-5.1 and glm-5 have contextLength updated from 204800 to 200000 tokens.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Two models from Zhipu now rest,
With shorter tokens—still the best!
From 204k down to 200k,
Context adjusted, hip hooray!
A config tweak, both sharp and neat. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main change: lowering the context length for GLM custom provider models from 204,800 to 200,000 tokens.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/glm-custom-context-200000

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@manual-templates/custom-provider-overrides.json`:
- Line 846: The contextLength entries in
manual-templates/custom-provider-overrides.json for model overrides are
inconsistent with Zhipu specs: adjust the "contextLength" values for the
glm-5v-turbo and glm-4.7 overrides (currently 204800) to match Zhipu's
documented values (~202752 for glm-5v-turbo and ~203000 for glm-4.7) or add an
inline comment/README note near those model override objects explaining why the
override intentionally differs; update the JSON entries for the model keys
"glm-5v-turbo" and "glm-4.7" (and verify "glm-5.1" and "glm-5" remain at 200000)
so the file consistently reflects the platform specs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d7eff1b-f20e-4731-b538-f530bac2ed6a

📥 Commits

Reviewing files that changed from the base of the PR and between 6bfbc2a and 4e8405a.

⛔ Files ignored due to path filters (2)
  • dist/all.json is excluded by !**/dist/**
  • dist/custom-provider.json is excluded by !**/dist/**
📒 Files selected for processing (1)
  • manual-templates/custom-provider-overrides.json

"name": "GLM-5.1",
"family": "glm",
"contextLength": 204800,
"contextLength": 200000,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What is the maximum context length for Zhipu glm-5.1 and glm-5 models?

💡 Result:

As of June 2, 2026, both the Zhipu GLM-5 and GLM-5.1 models support a context window of 200,000 (200K) tokens [1][2][3]. While some technical documentation or specific API implementations (such as the NVIDIA NIM reference for GLM-5.1) may list 131,072 tokens for specific integration environments [4], the models' native architecture is designed for and widely recognized as supporting a 200K-token context window [5][1][6][3]. This capacity is supported by the models' use of Sparse Attention mechanisms (specifically DeepSeek Sparse Attention) to maintain coherence across extended sequences, which is a key feature for their intended use in long-horizon agentic and engineering tasks [1][6][3].

Citations:


🌐 Web query:

What is the maximum context length for Zhipu glm-5v-turbo and glm-4.7 models?

💡 Result:

Both the Zhipu GLM-4.7 and GLM-5V-Turbo models support a maximum context window of approximately 203,000 tokens (often cited in documentation as 200K tokens) [1][2][3][4][5][6]. Specifically: - GLM-4.7: Features a context window of 203,000 tokens [2][3]. - GLM-5V-Turbo: Features a context window of 202,752 tokens [7][6]. For both models, the maximum output token limit is generally 128,000 to 131,072 tokens [3][8][7][5][6].

Citations:


Align contextLength values with Zhipu platform specs.

  • manual-templates/custom-provider-overrides.json: glm-5.1 (line 846) and glm-5 (line 878) contextLength: 200000 matches the current Zhipu docs.
  • glm-5v-turbo (line 910) and glm-4.7 (line 942) should not remain 204800; Zhipu docs list ~202,752 for glm-5v-turbo and ~203,000 for glm-4.7—update these values or document why the override intentionally differs.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@manual-templates/custom-provider-overrides.json` at line 846, The
contextLength entries in manual-templates/custom-provider-overrides.json for
model overrides are inconsistent with Zhipu specs: adjust the "contextLength"
values for the glm-5v-turbo and glm-4.7 overrides (currently 204800) to match
Zhipu's documented values (~202752 for glm-5v-turbo and ~203000 for glm-4.7) or
add an inline comment/README note near those model override objects explaining
why the override intentionally differs; update the JSON entries for the model
keys "glm-5v-turbo" and "glm-4.7" (and verify "glm-5.1" and "glm-5" remain at
200000) so the file consistently reflects the platform specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant