Skip to content

feat: add GLM-4.7-Flash and FlashX models - #1483

Merged
steebchen merged 2 commits into
mainfrom
feat/add-glm-4.7-flash-models
Jan 22, 2026
Merged

steebchen merged 2 commits into
mainfrom
feat/add-glm-4.7-flash-models

Conversation

@rcogal

@rcogal rcogal commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add GLM-4.7-FlashX model (lightweight, high-speed, $0.07/1M input, $0.4/1M output)
  • Add GLM-4.7-Flash model (free, lightweight)

Test plan

  • Verified both models work via direct API call to Z.ai
  • Test via gateway endpoint after deployment

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added two new GLM-4.7 model variants: glm-4.7-flashx (paid) and glm-4.7-flash (free). Both offer full feature support — streaming, reasoning, vision, tool use, and structured output — with the free variant provided at zero pricing.

✏️ Tip: You can customize this high-level summary in your review settings.

Add two new Z.ai models:
- GLM-4.7-FlashX: Lightweight, high-speed variant ($0.07/1M input, $0.4/1M output)
- GLM-4.7-Flash: Free, lightweight variant

Both models have 200K context, 128K max output, and support reasoning, tools, and JSON output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rcogal
rcogal requested a review from steebchen January 21, 2026 10:51
@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds two GLM-4.7 variants (glm-4.7-flashx and glm-4.7-flash) to the zaiModels registry with metadata and zai provider entries; the flash variant has zero pricing while flashx includes paid pricing.

Changes

Cohort / File(s) Summary
New GLM-4.7 Flash Variants
packages/models/src/models/zai.ts
Added glm-4.7-flashx and glm-4.7-flash entries to zaiModels with full metadata and a single zai provider object (pricing, cachedInputPrice, requestPrice, discount, contextSize, maxOutput, capability flags: streaming, reasoning, vision, tools, jsonOutput).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • smakosh
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add GLM-4.7-Flash and FlashX models' directly and clearly summarizes the main change: adding two new GLM model variants to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@rcogal

rcogal commented Jan 21, 2026

Copy link
Copy Markdown
Collaborator Author

Tested the new models, and it works on LLM current design

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/models/src/models/zai.ts`:
- Around line 263-286: The Z.ai provider entry for model id "glm-4.7-flashx" is
missing the discount field; update the providers array entry (providerId "zai",
modelName "glm-4.7-flashx") to include discount: 0.1 placed after outputPrice:
0.4 / 1e6 so it matches other paid Z.ai direct models and ensures downstream
pricing uses the intended 10% discount.

Comment thread packages/models/src/models/zai.ts
@steebchen
steebchen enabled auto-merge January 22, 2026 13:43
@steebchen
steebchen added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 0480d2f Jan 22, 2026
13 of 14 checks passed
@steebchen
steebchen deleted the feat/add-glm-4.7-flash-models branch January 22, 2026 13:58
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.

2 participants