Skip to content

feat(models): provide 10% off zai models - #1106

Merged
steebchen merged 3 commits into
mainfrom
feat/zai
Nov 4, 2025
Merged

steebchen merged 3 commits into
mainfrom
feat/zai

Conversation

@steebchen

@steebchen steebchen commented Nov 3, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Added discount configuration fields to multiple GLM model variants for future pricing functionality.

@coderabbitai

coderabbitai Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

A discount: 0.1 property is added to eight GLM model provider entries in the ZAI models configuration. The changes are purely data additions to existing provider objects without modifications to logic or computations.

Changes

Cohort / File(s) Summary
ZAI model discount configuration
packages/models/src/models/zai.ts
Added discount: 0.1 field to eight GLM provider entries: glm-4.5, glm-4.5v, glm-4.5-air, glm-4.5-x, glm-4.5-airx, glm-4.5-flash, glm-4.6, and glm-4-32b-0414-128k

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Simple, repetitive addition of the same configuration property across multiple provider entries
  • No logic changes or algorithmic complexity
  • No cross-file dependencies or functional impact

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'feat(models): provide 10% off zai models' is directly related to the main change in the changeset. The summary confirms that a discount field with value 0.1 (10%) has been added to multiple ZAI model provider entries, making the title accurate and appropriately specific about the primary modification.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/zai

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a79bd1a and 0cd6ba8.

📒 Files selected for processing (1)
  • packages/models/src/models/zai.ts (8 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Always use top-level import; never use require() or dynamic import()

Files:

  • packages/models/src/models/zai.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Never use any or as any in this TypeScript project unless absolutely necessary
Always use top-level import; do not use require or dynamic import()

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: lint / run
  • GitHub Check: test / run
  • GitHub Check: build / run
  • GitHub Check: generate / run
  • GitHub Check: e2e-shards (5)
  • GitHub Check: e2e-shards (3)
  • GitHub Check: e2e-shards (4)
  • GitHub Check: e2e-shards (1)
  • GitHub Check: e2e-shards (2)
  • GitHub Check: autofix
🔇 Additional comments (1)
packages/models/src/models/zai.ts (1)

14-14: ****

The review comment is based on incorrect assumptions. The discount property is correctly defined in the ProviderModelMapping interface and is actively applied in pricing calculations via the discountMultiplier in git/apps/gateway/src/lib/costs.ts (lines 175–192), where all token costs and request prices are reduced accordingly. Additionally, the discount field is not exclusive to ZAI models—it's used across multiple providers including OpenAI, Google, Deepseek, and Anthropic with varying discount rates. The code changes are correct as-is.

Likely an incorrect or invalid review comment.


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.

@steebchen
steebchen added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit 88fc958 Nov 4, 2025
12 of 13 checks passed
@steebchen
steebchen deleted the feat/zai branch November 4, 2025 15:10
@coderabbitai coderabbitai Bot mentioned this pull request Dec 22, 2025
4 tasks
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