-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: add GLM-4.6 model support to Z.AI provider #8412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add glm-4.6 model to both international and mainland Z.AI configurations - Update model to GLM-4.6 as default for both regions - Configure 200K context window (upgraded from 131K in GLM-4.5) - Add tiered pricing for mainland China (32K, 128K, 200K+ contexts) - Support 355B-parameter MoE architecture with improved capabilities - Enable prompt caching support for cost optimization GLM-4.6 represents Zhipu's latest SOTA model with significant improvements in coding, reasoning, search, writing, and agent applications across 8 authoritative benchmarks.
| cacheWritesPrice: 0, | ||
| cacheReadsPrice: 0.11, | ||
| description: | ||
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the GLM-4.6 description, 'agentsUpgraded' is missing a separator (e.g. a space or punctuation).
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", | |
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agents, upgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
| cacheWritesPrice: 0, | ||
| cacheReadsPrice: 0.057, | ||
| description: | ||
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the GLM-4.6 description for the Mainland model, 'agentsUpgraded' is missing a separator.
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", | |
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agents, Upgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention:
- Fix GLM-4.6 description typos and grammar (two places)
- Avoid using Infinity for contextWindow tier; use explicit 200_000
| cacheWritesPrice: 0, | ||
| cacheReadsPrice: 0.11, | ||
| description: | ||
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Typo/grammar. Missing space in 'agentsUpgraded' and plural 'models' should be singular. Add 'window' for clarity.
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", | |
| \"GLM-4.6 is Zhipu's latest SOTA model for reasoning, coding, and agents. Upgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and a 200K context window, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.\", |
| cacheWritesPrice: 0, | ||
| cacheReadsPrice: 0.057, | ||
| description: | ||
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Same copy issue as above.
| "GLM-4.6 is Zhipu's latest SOTA models for reasoning, code, and agentsUpgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and 200K context, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.", | |
| \"GLM-4.6 is Zhipu's latest SOTA model for reasoning, coding, and agents. Upgraded across 8 authoritative benchmarks. With a 355B-parameter MoE architecture and a 200K context window, it surpasses GLM-4.5 in coding, reasoning, search, writing, and agent applications.\", |
| cacheReadsPrice: 0.057, | ||
| }, | ||
| { | ||
| contextWindow: Infinity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Using Infinity for a tier contextWindow can cause issues in some consumers (JSON serialization, numeric comparisons). Given the model’s max supported context is 200K, use explicit numeric value.
| contextWindow: Infinity, | |
| contextWindow: 200_000, |
|
Thank you for the PR! Didn't have permission to make edits so went with #8408, but let me know if you see anything that got missed. |
GLM-4.6 represents Zhipu's latest SOTA model with significant improvements in coding, reasoning, search, writing, and agent applications across 8 authoritative benchmarks.
Related GitHub Issue
Closes: # 8406
Roo Code Task Context (Optional)
Description
Add support for GLM-4.6, Zhipu AI's latest SOTA model, to the Z.AI provider. This update makes GLM-4.6 the default model for both international and mainland China configurations.
Test Procedure
[x] All existing tests pass (15/15 tests green)
[x] Type checking passes
[x] Linting passes
[x] Build succeeds
[x] Extension packaged successfully
Pre-Submission Checklist
Documentation Updates
Additional Notes
Important
Add support for GLM-4.6 model to Z.AI provider, updating default model, context window, pricing, and enabling prompt caching.
GLM-4.6model tointernationalZAiModelsandmainlandZAiModelsinzai.ts.GLM-4.6as default model for both international and mainland China.GLM-4.5.This description was created by
for 1339c7c. You can customize this summary. It will automatically update as commits are pushed.