Skip to content

fix(antigravity): surface image quotas in Provider Limits - #12311

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
Bl0ck154:fix/antigravity-image-quota-visibility
Sep 18, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
Bl0ck154:fix/antigravity-image-quota-visibility

Conversation

@Bl0ck154

@Bl0ck154 Bl0ck154 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep Antigravity image-only models excluded from chat discovery
  • add a quota-specific visibility predicate for user-facing image quota buckets
  • use that predicate when parsing both fetchAvailableModels and retrieveUserQuota
  • add regression coverage proving gemini-3.1-flash-image is visible in Provider Limits while TTS/tab buckets remain hidden

Problem

Antigravity quota parsing currently reuses isDiscoverableAntigravityModelId(). That predicate is intentionally chat-specific and excludes gemini-3.1-flash-image, so Google can return a valid image quota bucket from retrieveUserQuota / fetchAvailableModels and 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 the retrieveUserQuota-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 --check
  • regression test added for live retrieveUserQuota precedence (25% image quota) and non-chat filtering

@diegosouzapw

Copy link
Copy Markdown
Owner

Babysit (/sweep-reds round 3, Fase B) — not merging. Base remains main.

Reds before: Lint (@typescript-eslint/no-explicit-any ×2), Quality Ratchet (eslintErrors: 2 > baseline 0), Unit Tests (3/8) stream-timing.test.ts totalMs() >= 15 flake (unrelated to this PR; not weakened), Build canceled (advisory / runner shutdown — not a defect).

Action:

  • Not behind origin/main; no merge.
  • Replaced (result as any).quotas as Record<string, any> with an explicit quotas map type (029c935d14).
  • Added missing trailing newlines on the two production files.

Local signal: tests/unit/antigravity-image-quota-visibility.test.ts 2/2 pass; eslint on the 3 changed files is clean.

CI running on 029c935d14. The stream-timing flake is not this PR's code; a re-run of shard 3/8 should be enough if it still trips.

@diegosouzapw

Copy link
Copy Markdown
Owner

Babysit (/sweep-reds round 4) — not merging. Base remains main (not retargeted).

Reds before on 029c935d14: CI Build (workflow CI, job Build — the real ci.yml job, not Quality Gates "Build (advisory)").

Diagnosis: not a compile error from this PR. Log from run 33527514344 / job 99922677981:

  • ✓ Compiled successfully in 7.3min
  • Skipping validation of types
  • Collecting page data using 3 workers ...
  • then The runner has received a shutdown signal / The operation was canceled

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 .github/workflows/, did not weaken the build, did not re-run, did not push. HEAD remains 029c935d14.

@diegosouzapw

Copy link
Copy Markdown
Owner

This is ready — small, well-scoped fix with solid unit + integration test coverage, and it's
already been through two rounds of red-sweeping. The only outstanding CI red (Build) is a
hosted-runner shutdown/cancel after a successful compile, not a real failure. The one thing
left is retargeting from main to release/v3.8.51 so it can actually land — happy to see this
merged once that's done.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.51 September 15, 2026 11:32
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.
@Bl0ck154
Bl0ck154 force-pushed the fix/antigravity-image-quota-visibility branch from 029c935 to d8f4d56 Compare September 15, 2026 17:18
@diegosouzapw

Copy link
Copy Markdown
Owner

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.

@diegosouzapw
diegosouzapw merged commit efbcc3d into diegosouzapw:release/v3.8.51 Sep 18, 2026
10 of 16 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…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.
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.

2 participants