Repository navigation
fix(antigravity): read the Gemini pool from the quota summary reliably - #177
Merged
Merged
Conversation
The summary picked the first group with windows when the Gemini group did not match, so the widget showed the "Claude and GPT models" quota under the Antigravity name. - The first endpoint that returns retrieveUserQuotaSummary is authoritative and returned at once; endpoints are no longer merged and fetchAvailableModels is skipped when the summary answered. - Groups are classified as Gemini or external (claude/gpt/3p-* buckets); an unrecognised group is used only when it is the sole group. - A summary without recognised windows (or with an empty group list) is "no limit data", not a failure. - The model-quota fallback uses Gemini models only, because per-model quotas do not say which window they belong to. - Send an explicit Antigravity User-Agent; try the sandbox endpoint last. - Absent windows are cached with `percentage: null` so external readers see "unknown" rather than 0% used. Co-Authored-By: Claude Opus 5.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.
Summary
Fixes Antigravity quota retrieval so that the first-party Gemini quota pool is correctly identified, parsed, and displayed without falling back to or mixing with third-party model groups.
Motivation & Problem
daily-cloudcode-pa.googleapis.com) inspects the clientUser-Agent. When queried with an unqualifiedantigravityheader, the backend filtered out theGemini Modelsgroup entirely, returning only third-party Claude/GPT groups.Key Changes
User-Agent: antigravity/2.24.0acrossloadCodeAssist,fetchAvailableModels, andretrieveUserQuotaSummary. This ensures Google's API returns the complete, modern quota tree including Gemini models.retrieveUserQuotaSummaryis treated as authoritative and returned immediately.fetchAvailableModelscalls are skipped when the summary has answered.claude,gpt,3p-*buckets).parse_iso8601) on bucket reset timestamps without artificial day offsets.percentage: null(displaying--rather than a misleading0% used).Verification & Tests
src/poller/tests.rscovering summary parsing with multiple groups, single-group fallbacks, missing windows, and empty buckets.live_quota_summary_shape).