Skip to content

feat(models): add glm-4.6v-flashx and update prices - #1375

Merged
steebchen merged 2 commits into
mainfrom
terragon/update-glm-price-models-yqaa6d
Dec 30, 2025
Merged

steebchen merged 2 commits into
mainfrom
terragon/update-glm-price-models-yqaa6d

Conversation

@steebchen

@steebchen steebchen commented Dec 29, 2025

Copy link
Copy Markdown
Member

Summary

  • Updates GLM model pricing for the Zai provider.
  • Adds new GLM-4.6V FlashX model with extended capabilities.

Changes

Data model updates

  • glm-4.6v: reduced input price from 0.6 / 1e6 to 0.3 / 1e6
  • glm-4.6v: reduced cached input price from 0.11 / 1e6 to 0.05 / 1e6
  • Adds new model entry glm-4.6v-flashx under the Zai provider with the following properties:
    • id: glm-4.6v-flashx
    • name: GLM-4.6V FlashX
    • description: "Fast vision-language model with extended capabilities."
    • family: glm
    • releasedAt: 2025-06-01
    • publishedAt: 2025-06-01
    • providers:
      • providerId: zai
        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

  • packages/models/src/models/zai.ts
    • Updated glm-4.6v pricing
    • Added new glm-4.6v-flashx model entry with detailed capabilities

Test plan

  • Build project to ensure type integrity after changes
  • Verify glm-4.6v pricing updates are reflected in the model list
  • Verify new glm-4.6v-flashx model appears with correct properties (input/cached/input, output, contextSize, maxOutput, features)
  • Run existing unit tests (if any) to confirm no regressions

Notes

  • The new glm-4.6v-flashx model provides extended features (streaming, reasoning, vision, tools, jsonOutput) for advanced workflows. Reviewers can adjust pricing or capabilities if product requirements change.

🌿 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

    • Added glm-4.6v-flashx model offering streaming, reasoning, vision, tool integration, and JSON output support.
  • Updates

    • Reduced pricing for the glm-4.6v family and introduced lower-cost pricing tiers for the new flashx variant.

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

- 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>
Copilot AI review requested due to automatic review settings December 29, 2025 23:55
@github-actions github-actions Bot changed the title Update GLM prices from Zai; add glm-4.6v-flashx feat(models): update GLM prices Dec 29, 2025
@coderabbitai

coderabbitai Bot commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updated 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

Cohort / File(s) Change Summary
GLM model registry
packages/models/src/models/zai.ts
Updated glm-4.6v provider pricing (inputPrice 0.6→0.3 per 1M, cachedInputPrice 0.11→0.05 per 1M). Added new glm-4.6v-flashx entry (provider: zai) with inputPrice 0.04, cachedInputPrice 0.004, outputPrice 0.4, discount 0.1, contextSize 128000, maxOutput 16000, streaming, reasoning, vision, tools, and jsonOutput flags.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #1307: Modifies the same glm-4.6v model family entries and pricing in packages/models/src/models/zai.ts.
  • #1346: Adds/updates GLM model entries and pricing/capabilities in the same zai.ts registry.
  • #1106: Updates provider-level pricing/discount fields for GLM models in packages/models/src/models/zai.ts.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: adding glm-4.6v-flashx model and updating GLM model prices for the zai provider.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@steebchen
steebchen enabled auto-merge December 29, 2025 23:57
@steebchen steebchen changed the title feat(models): update GLM prices feat(models): add glm-4.6v-flashx and update prices Dec 29, 2025
@steebchen
steebchen disabled auto-merge December 29, 2025 23:59
@steebchen
steebchen enabled auto-merge December 29, 2025 23:59

@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

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 90c53ec and 0ae8967.

📒 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 use any or as any unless absolutely necessary in TypeScript code
For database reads: Use db().query.<table>.findMany() or db().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-level import, 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-flashx model 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.

Comment on lines +318 to +319
releasedAt: new Date("2025-12-08"),
publishedAt: new Date("2025-12-08"),

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.

⚠️ Potential issue | 🟡 Minor

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).

@steebchen
steebchen added this pull request to the merge queue Dec 30, 2025
Merged via the queue into main with commit 8dd930a Dec 30, 2025
14 of 15 checks passed
@steebchen
steebchen deleted the terragon/update-glm-price-models-yqaa6d branch December 30, 2025 00:10
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