fix(usage): price Antigravity Gemini Flash model aliases - #8997
Open
mameikagou wants to merge 1 commit into
Open
mameikagou wants to merge 1 commit into
mameikagou wants to merge 1 commit into
Conversation
|
@mameikagou is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
What does this PR do?
Fix zero/unmapped estimated cost for current Gemini Flash usage reported by Antigravity. The agent already collects token usage, but the frontend has no Gemini price rows and backend metrics lack current Flash versions. Antigravity also reports names such as
Gemini 3.8 Flash (High)andgemini-3.8-flash-high, which do not match the API SKU.Related Issue
User-reported Gemini usage-statistics gap. This is independent of #8679: it estimates token cost, not remaining subscription quota.
Type of Change
Changes Made
Source: Google's official pricing, accessed 2026-10-01. Gemini 3.6–3.8 rows use the published rates through 2026-12-31 ($0.75 input / $3.75 output / $0.075 cached input per million tokens); comments explicitly flag the 2027 promotion expiry. 3.5 Flash is priced independently ($1.50 / $9 / $0.15).
How to Test
cd server && go test ./internal/metricspnpm --filter @multica/views exec vitest run runtimes/utils.test.tsGemini 3.8 Flash (High)andgemini-3.8-flash-highusage rows: 1M uncached input tokens now estimates $0.75 rather than zero/unmapped. Unknowngemini-3.8-flash-liveremains unmapped.Validation: the full Go metrics package passes, and all 101 frontend utility tests pass. Tests use synthetic token rows and do not invoke a real agent or quota endpoint.
Thinking Path / Risks
Antigravity already reports tokens and the actual selected model. Preserve that collected identity and normalize only for price lookup, so historical labels are not rewritten and reasoning settings are not changed. Estimates remain API-equivalent costs for standard text/context tokens, not actual subscription charges. Per-turn totals do not reveal per-request pricing tiers, grounding requests or cache storage duration. No auth/token files, quota fetching, retries or agent stream behavior are changed. The static promotional prices need updating after 2026-12-31, as documented at both tables.
Checklist
No layout, translated copy, new runtime, UI tab, or protocol changes. No screenshots applicable.
AI Disclosure
AI tool used: Codex via Multica.
Prompt / approach: Inspect upstream issues and local Antigravity model-name diagnostics, check official pricing, implement a scoped usage-estimation fix, then review both price resolvers and regression tests.