Repository navigation
feat(prices): add Gemini 4 Carbon rates and Antigravity model mappings - #77
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景与变更
Google 已在 Gemini API 与 Vertex AI 公布 Gemini 4 Carbon(
gemini-4-carbon)的公开定价,与 Gemini 4 Argon 一致,采用全 1M 上下文单一费率且未公布按 token 计价的缓存写入单价,促销期持续至 2026-11-30(Standard 为 $2 输入、$0.10 缓存读取、$10 输出,Flex 为 $1 输入、$0.05 缓存读取、$5 输出),自 2026-12-01 起恢复标准目录价(Standard 为 $4 输入、$0.20 缓存读取、$20 输出,Flex 为 $2 输入、$0.10 缓存读取、$10 输出)。prices/meterleaf-2026-10-30.json(修订升至2026-10-30.3)补充gemini-4-carbon促销期与促销后两段 Standard 与 Flex 费率规则(同时覆盖subscription与api口径)src/collector/agy.ts补充 Antigravity 的gemini-4-carbon显示名映射与枚举号(1427、1437、1438)及新版 Argon 枚举号(1417、1418、1419),确保 Antigravity CLI 与 omp 的三档请求统一归入gemini-4-carbon计价与 Gemini 额度池统计docs/pricing.md并在tests/price-book.test.ts、tests/collector-agy.test.ts覆盖促销期、促销后、缓存写入未计价及三档模型归一化场景验证
bun run typecheck通过bun test tests(85 个测试文件共 624 项测试全部通过)bunx prettier --check与git diff --check通过