fix(antigravity): show one representative model per family, not an aggregate - #915
Merged
Merged
Conversation
…gregate Two problems with the same root: the card was describing something no model actually experiences. Aggregating a family took the minimum across its members, but members do not share a bucket. On a live account gemini-2.5-pro and gemini-3.1-pro-high are both "Gemini Pro" while resetting on different cycles, so the row reported the lower of two unrelated quotas with a countdown from whichever expired first — a pair of numbers true of neither model. Each family now shows one representative member's real percentage and its own reset. Preference order ranks which member best represents the family; it is not an allowlist, so a family with none of its preferred ids still shows whichever member the upstream sent, and unclassified models each get their own row under their own name rather than being collapsed into one bar. Meta names the model behind the number so the card can say which, rather than implying the whole family was measured. Also: quota merging now replaces rather than carries forward when every incoming window belongs to a provider that reports its full set on each probe. Codex answers with a subset on roughly a fifth of probes and still needs the merge, but antigravity's endpoints return everything or nothing. Renaming its keys previously left the old and new sets rendering side by side for a full 24h retention window, which looked like duplicated quotas. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Backend half. Pairs with codeProxy — merge this first.
The card was describing something no model experiences
Aggregating a family took the minimum across its members, but members do not share a bucket. Captured from the live account:
gemini-3.1-pro-highgemini-2.5-proThe row therefore reported the lower of two unrelated quotas, with a countdown from whichever expired first — a pair of numbers true of neither model. Invisible while everything sits at 100%, wrong the moment usage diverges.
The change
Each family shows one representative member's real percentage and its own reset.
Preference order (
gemini-pro-agent→gemini-3.1-pro-high→ …) is a ranking, not an allowlist: a family with none of its preferred ids still shows whichever member the upstream sent, so a model shipped after this code cannot make a row disappear. Unclassified models each get their own row under their own name instead of collapsing into one "other" bar.Metanames the model behind the number, so the card can state which model was measured rather than implying the whole family was.Quota merging: replace for full-snapshot providers
Renaming antigravity's keys previously left the old and new key sets rendering side by side for the full 24h retention window — the duplicated-rows report.
mergeQuotaWindowsnow replaces rather than carries forward when every incoming window belongs to a provider that reports its complete set on each probe. Codex is the counter-example the merge exists for — it answers with onlyrate_limitor onlyadditional_rate_limitson roughly a fifth of probes, so a missing window there means "not mentioned". Antigravity's two endpoints return everything or nothing, so a missing window means gone.Both behaviours are pinned by tests, including that a carried-forward codex window keeps its original timestamp.
Verification
go build ./...,gofmt,go vetclean; fullgo test ./...green.🤖 Generated with Claude Code