You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pricing): recognize -xhigh suffix in Antigravity Gemini alias mapping - #877
go test ./database -run 'TestPricingManagementModelKeyPreservesIndependentAlias|TestAntigravityPricingAliasInheritance' -v
以上用例全部 PASS。
Summary by CodeRabbit
Bug Fixes
Gemini model pricing now recognizes the -xhigh variant and applies the canonical model’s pricing, including inherited input, output, and cache-read prices.
No actionable comments were generated in the recent review.
Walkthrough
Gemini pricing canonicalization now strips the -xhigh suffix. Tests cover the management key, alias target, and inheritance of synced prices from the base model.
Changes: Gemini xhigh pricing alias
Layer / File(s)
Summary
Canonicalization and price inheritance database/model_pricing_override.go, database/model_pricing_override_test.go
Canonicalization strips the -xhigh suffix. Tests verify that gemini-4-hydrogen-xhigh remains a management key, aliases to gemini-4-hydrogen, and inherits its synced input, output, and cache-read prices.
james-6-23/codex2api#834: Adds tier-suffix normalization for Antigravity pricing inheritance, which this change extends with -xhigh.
Suggested reviewers:james-6-23
Merge Risk: Minimal · up to 5d8e6
This change makes the gemini-4-hydrogen-xhigh alias inherit pricing from gemini-4-hydrogen. No merge-blocking risk is evident from the supplied changes.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the actual change: the Antigravity Gemini alias mapping now recognizes the -xhigh suffix. The raw summary confirms that antigravityCanonicalPricingModel now strips -xhigh for Gemini mo…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the actual change: the Antigravity Gemini alias mapping now recognizes the -xhigh suffix. The raw summary confirms that antigravityCanonicalPricingModel now strips -xhigh for Gemini models, and the tests cover the gemini-4-hydrogen-xhigh alias inheritance. The title is specific, concise, and free of file lists or vague terms.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 83c42a26-eada-4fbe-9549-9759f1876910
Commits
Reviewing files that changed from the base of the PR and between 811ad45 and 5d8e6ff.
Files selected for processing: 2
database/model_pricing_override.go
database/model_pricing_override_test.go
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
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
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.
问题背景
gemini-4-hydrogen引入了新的-xhigh思考档位后缀(gemini-4-hydrogen-xhigh),但上游同步源(如models.dev/litellm)仅包含裸模型名gemini-4-hydrogen。目前
database/model_pricing_override.go中的antigravityCanonicalPricingModel仅剥离"-high","-medium","-low","-tiered",导致gemini-4-hydrogen-xhigh无法映射回gemini-4-hydrogen继承同步定价(仍回落为$1/$2默认价),而同系列的-low/-medium/-high均可正常同步为$1.50/$0.075/$7.50。修改内容
database/model_pricing_override.go:在antigravityCanonicalPricingModel的gemini-后缀列表中加入"-xhigh"(置于"-high"之前)。database/model_pricing_override_test.go:补充gemini-4-hydrogen-xhigh在TestPricingManagementModelKeyPreservesIndependentAlias与TestAntigravityPricingAliasInheritance中的测试用例。测试验证
以上用例全部 PASS。
Summary by CodeRabbit
-xhighvariant and applies the canonical model’s pricing, including inherited input, output, and cache-read prices.