feat(models): add glm-4.6v-flashx and update prices - #1375
Conversation
- Added new model "GLM-4.6V FlashX" with advanced vision-language capabilities, extended context size and features such as streaming, reasoning, vision, tools, and JSON output. - Updated inputPrice and cachedInputPrice for existing "glm-4.6v" model to reduce costs. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
WalkthroughUpdated ZAI model registry: adjusted glm-4.6v pricing and added a new glm-4.6v-flashx provider entry with distinct pricing and expanded capabilities (128K context, streaming, reasoning, vision, tools, JSON output). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates GLM model pricing for the Zai provider and introduces a new intermediate-performance vision model variant.
- Reduced pricing for the glm-4.6v model (50% reduction on input price, ~55% on cached input)
- Added glm-4.6v-flashx model as a new mid-tier option between the flagship glm-4.6v and the free glm-4.6v-flash
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/models/src/models/zai.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Never useanyoras anyunless absolutely necessary in TypeScript code
For database reads: Usedb().query.<table>.findMany()ordb().query.<table>.findFirst()
Files:
packages/models/src/models/zai.ts
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (CLAUDE.md)
Always use tabs for indentation
Files:
packages/models/src/models/zai.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,js,jsx}: Always use top-levelimport, never use require or dynamic imports
No unnecessary code comments
Files:
packages/models/src/models/zai.ts
**/*.{js,ts,tsx,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Always use top-level
import, never use require or dynamic imports
Files:
packages/models/src/models/zai.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: e2e-shards (4)
- GitHub Check: e2e-shards (2)
- GitHub Check: e2e-shards (1)
- GitHub Check: e2e-shards (3)
- GitHub Check: e2e-shards (5)
- GitHub Check: lint / run
- GitHub Check: build / run
- GitHub Check: generate / run
- GitHub Check: test / run
- GitHub Check: autofix
🔇 Additional comments (2)
packages/models/src/models/zai.ts (2)
298-299: LGTM! Pricing updates match PR objectives.The pricing reductions for glm-4.6v are correctly implemented and align with the documented changes.
313-338: Configuration is accurate and matches official Z.ai documentation.The
glm-4.6v-flashxmodel pricing and capabilities have been verified against official Z.ai specifications:
- Pricing: inputPrice ($0.04/1M), outputPrice ($0.40/1M), and cachedInputPrice ($0.004/1M) match the official documentation exactly.
- Capabilities: streaming, vision, tools, and reasoning are all confirmed in official API documentation.
- Context & output: 128K context window and conservative maxOutput of 16000 tokens are appropriate for this variant.
The configuration is correct and ready.
| releasedAt: new Date("2025-12-08"), | ||
| publishedAt: new Date("2025-12-08"), |
There was a problem hiding this comment.
Date mismatch with PR objectives.
The code specifies 2025-12-08 for both releasedAt and publishedAt, but the PR objectives document states these should be 2025-06-01. While the commit message indicates the dates were intentionally updated, this creates an inconsistency with the documented PR objectives.
Please clarify which date is correct, as this metadata may affect model display ordering or filtering.
🤖 Prompt for AI Agents
In packages/models/src/models/zai.ts around lines 318-319, the releasedAt and
publishedAt fields are set to 2025-12-08 but the PR objectives require
2025-06-01; update both fields to new Date("2025-06-01") so the metadata matches
the PR objectives (or, if the December date is intentional, update the PR
objectives/docs to reflect 2025-12-08 and note the reason).
Summary
Changes
Data model updates
modelName: glm-4.6v-flashx
inputPrice: 0.04 / 1e6
cachedInputPrice: 0.004 / 1e6
outputPrice: 0.4 / 1e6
discount: 0.1
requestPrice: 0
contextSize: 128000
maxOutput: 16000
streaming: true
reasoning: true
vision: true
tools: true
jsonOutput: true
Files touched
Test plan
Notes
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/2161d4fc-8c77-4560-97a3-0518ae723b66
Summary by CodeRabbit
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.