Skip to content

fix(antigravity): show one representative model per family, not an aggregate - #915

Merged
kittors merged 1 commit into
devfrom
feat/antigravity-compact-quota-card
Aug 20, 2026
Merged

fix(antigravity): show one representative model per family, not an aggregate#915
kittors merged 1 commit into
devfrom
feat/antigravity-compact-quota-card

Conversation

@kittors

@kittors kittors commented Aug 20, 2026

Copy link
Copy Markdown
Owner

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:

model family resets
gemini-3.1-pro-high Gemini Pro weekly
gemini-2.5-pro Gemini Pro 5-hourly

The 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-agentgemini-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.

Meta names 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.

mergeQuotaWindows now 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 only rate_limit or only additional_rate_limits on 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 vet clean; full go test ./... green.

🤖 Generated with Claude Code

…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>
@kittors
kittors merged commit d0e57d2 into dev Aug 20, 2026
3 checks passed
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