fix(antigravity): surface image quotas in Provider Limits - #12311
diegosouzapw merged 1 commit into
Conversation
|
Babysit (/sweep-reds round 3, Fase B) — not merging. Base remains Reds before: Lint ( Action:
Local signal: CI running on |
|
Babysit (/sweep-reds round 4) — not merging. Base remains Reds before on Diagnosis: not a compile error from this PR. Log from run
Hosted-runner shutdown / cancel (same class as the previous advisory Build cancel). No TypeScript/compile failure in this diff. Action: needs-owner. Did not edit |
|
This is ready — small, well-scoped fix with solid unit + integration test coverage, and it's |
Rebase the focused image-quota visibility fix onto the current release/v3.8.51 tip while preserving the newer shared Antigravity catalog and AGY live-discovery changes.
029c935 to
d8f4d56
Compare
|
Thanks @Bl0ck154 — merging via the release merge-train. Validated in local merge-train (.claude/worktrees/merge-train-20260918-111718-suite.log) on the devbox @ train tip 7bb373fba5e241964c0ffb17bd03a804700839bb, boarded with 55 sibling PRs: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; 747/747 changed-area node:test cases + 476/476 vitest green (fast parity mode — the full suite ran today on the release tip via the base-red train and runs again on the 3b train). Merged --admin per merge-gates §7. |
efbcc3d
into
diegosouzapw:release/v3.8.51
…pw#12311) Rebase the focused image-quota visibility fix onto the current release/v3.8.51 tip while preserving the newer shared Antigravity catalog and AGY live-discovery changes.
Summary
fetchAvailableModelsandretrieveUserQuotagemini-3.1-flash-imageis visible in Provider Limits while TTS/tab buckets remain hiddenProblem
Antigravity quota parsing currently reuses
isDiscoverableAntigravityModelId(). That predicate is intentionally chat-specific and excludesgemini-3.1-flash-image, so Google can return a valid image quota bucket fromretrieveUserQuota/fetchAvailableModelsand OmniRoute silently drops it before the Provider Limits UI sees it.The image model should remain absent from the chat catalog, but its quota is user-facing because the model is callable through
/v1/images/generations.Implementation
Introduce
isUserVisibleAntigravityQuotaModelId()as a separate concern from chat discovery. It accepts normal discoverable chat models plus the known user-facing Antigravity image quota IDs, while continuing to reject TTS, tab-completion, retired, and other non-chat buckets.getAntigravityUsage()now uses this quota predicate in both quota passes, including theretrieveUserQuota-only path.Related work
#9231 already fixed OAuth refresh / quota-aware credential selection and 401 account rotation for the image-generation route. This PR does not duplicate that work; it only fixes quota visibility in Provider Limits.
Validation
git diff --checkretrieveUserQuotaprecedence (25%image quota) and non-chat filtering