GeezerVison is showing github.com — fix(antigravity): isolate dedicated Gemini subfamily usage buckets by frndchagas · Pull Request #39859 · pingdotgg/t3code
Conversation
Problem
Antigravity accounts can have dedicated quota buckets for specific Gemini subfamilies (for example gemini-argon-wtu-weekly or gemini-neon-*) alongside the default gemini-5h and gemini-weekly pools, which had two bugs:
summaryWindows in apps/server/src/provider/antigravityUsageLimits.ts hardcoded only gemini-argon- and gemini-carbon-, collapsing any other dedicated gemini-<subfamily>-* bucket into the generic "Gemini" label.
exhaustedUsageWindow in packages/shared/src/usageLimits.ts matched every gemini-* bucket against every gemini-* model (and antigravity-default). An exhausted gemini-argon-wtu-weekly bucket triggered fallback for unrelated models like gemini-4-neon or gemini-3.8-flash, and an exhausted default gemini-weekly bucket blocked a model whose own dedicated subfamily bucket still had quota left.
Fix
- Generalize
summaryBucketFamily in apps/server/src/provider/antigravityUsageLimits.ts so only gemini-5h, gemini-weekly, and gemini-quota map to "Gemini"; any other gemini-<subfamily>-* bucket uses group.displayName or Gemini <Subfamily>.
- Update
exhaustedUsageWindow in packages/shared/src/usageLimits.ts so dedicated Gemini subfamily buckets match only Gemini models containing that subfamily token, and models covered by an active dedicated subfamily bucket are not blocked by an exhausted default Gemini bucket.
Verification
- Verified live Antigravity quota rendering in
/usage on an isolated dev server with two accounts (one exposing gemini-argon-wtu-weekly alongside gemini-5h and gemini-weekly), confirming separate Gemini 4 Argon · Weekly labeling and ordering.
- Extended
antigravityUsageLimits.test.ts (Argon, Carbon, Neon labels with and without group.displayName) and packages/shared/src/usageLimits.test.ts (cross-subfamily isolation and active dedicated bucket precedence over exhausted gemini-weekly).
- Ran
vp run check:changed upstream/main: format, lint, knip, graphql, typecheck (36 packages), and tests (3 files, 122 passed, 1 Windows-only skipped) all pass.
Built with Gemini 4 Neon in T3 Code (Antigravity harness).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jieyuexing reacted with thumbs up emoji
|

No actionable comments were generated in the recent review.
Walkthrough
-
Antigravity quota windows now distinguish dedicated Gemini subfamily pools from default Gemini pools. Summary bucket labels use group names or subfamily names for Gemini buckets that are not default buckets.
Changes: Gemini Subfamily Quotas
| Layer / File(s) |
Summary |
Gemini quota pool matching packages/shared/src/usageLimits.ts, packages/shared/src/usageLimits.test.ts |
Dedicated Gemini subfamily windows match models with the corresponding subfamily. Default Gemini windows match Gemini models only when no dedicated Gemini pool exists. Tests cover Argon and Neon pool selection and exhaustion behavior. |
Gemini quota bucket labels apps/server/src/provider/antigravityUsageLimits.ts, apps/server/src/provider/antigravityUsageLimits.test.ts |
Summary buckets use default Gemini labels or derive other Gemini family labels from group names or bucket IDs. Tests check Neon weekly and 5-hour labels. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#24801: Changes the group display name used for Argon bucket labels, overlapping with the updated Gemini subfamily label logic.
- pingdotgg/t3code#33991: Adds Carbon-specific quota bucket labels in the same file and overlaps with the generalized subfamily labeling.
- pingdotgg/t3code#21361: Separates Argon summary buckets and affects fallback quota selection, which overlaps with the updated Gemini pool matching.
Suggested labels: bugfix
Suggested reviewers: maria-rcks, juliusmarminge, drseedon
Merge Risk: Minimal · up to c19d1
-
This change gives dedicated Gemini subfamily quotas their own labels and keeps an exhausted default Gemini quota from blocking models that have an active dedicated quota. The supplied evidence shows no remaining merge-blocking risk.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title "fix(antigravity): isolate dedicated Gemini subfamily usage buckets" matches the main change. The PR generalizes subfamily labeling in summaryBucketFamily and stops dedicated Gemini subfamil… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the two bugs and their fixes clearly. Verification lists focused… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title "fix(antigravity): isolate dedicated Gemini subfamily usage buckets" matches the main change. The PR generalizes subfamily labeling in summaryBucketFamily and stops dedicated Gemini subfamily buckets from matching unrelated Gemini models in exhaustedUsageWindow. It follows the conventional commit style the template asks for.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the two bugs and their fixes clearly. Verification lists focused tests, a live /usage check, and the repo check command with results. The Scope section does not link an issue or explain why none is needed, and the template asks for that. The template's HTML comments are removed, which is acceptable.
Resolution
Optional: add a linked issue or a note explaining why none is needed in the Scope section, as the template requests.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 338352d and c19d158.
Files selected for processing: 4
-
apps/server/src/provider/antigravityUsageLimits.test.ts
apps/server/src/provider/antigravityUsageLimits.ts
packages/shared/src/usageLimits.test.ts
packages/shared/src/usageLimits.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|