Skip to content

Show every Antigravity quota group, including Gemini 4 Argon - #173

Open
yo-xe wants to merge 4 commits into
CodeZeno:mainfrom
yo-xe:antigravity-argon
Open

yo-xe wants to merge 4 commits into
CodeZeno:mainfrom
yo-xe:antigravity-argon

Conversation

@yo-xe

@yo-xe yo-xe commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary

Closes #172

  • Add the 5h and weekly buckets of every Antigravity quota group to UsageData.limits. The key is limit_slug(group) plus the window. The headline selection does not change.
  • Query daily-cloudcode-pa before cloudcode-pa. Official Antigravity CLI queries the daily endpoint, which returns actual quota and real reset timestamps for Gemini, Claude and GPT, and Gemini 4 Argon. Production currently returns static remainingFraction=1.0 and resetTime=now+window for Gemini.
  • Send antigravity/cli/1.4.0 as the User-Agent. After a successful daily poll, also query the production endpoint and add any groups that daily does not return.
  • If the production call fails, the poller logs the error and keeps the daily result. If the daily call fails, the poller falls back to production and then to sandbox.

Testing

  • cargo fmt --all -- --check: pass.
  • cargo test --locked: 533 passed, 2 failed. The 2 failures (studio_app::tests::version_text_and_trailing_icon_share_one_update_button, diagnostics_page_has_logging_controls_and_menu_version) also occur on unmodified v2.19.4 (d0ab8b7) with a Japanese Windows UI language.
  • New regression tests in src/poller/tests.rs cover the group limits, the endpoint order and the merge of production groups. They use dummy data.
  • I built with cargo build --locked --release and ran the build with a theme that reads antigravity.limits.*. The taskbar showed live values for the Gemini, Claude and GPT, and Gemini 4 Argon groups.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
  • The change is focused and contains no credentials or sensitive data.
  • I have added or updated relevant documentation and tests, where applicable.
  • I have left changelog and version changes to maintainers unless requested.

yo-xe and others added 3 commits October 17, 2026 17:26
The summary keeps one Gemini group for the 5h/weekly headline and drops
the rest, so themes cannot show every group (for example Claude and GPT).
Add each group's 5h and weekly buckets to UsageData.limits, keyed by
group name and window.
daily-cloudcode-pa answers retrieveUserQuotaSummary with the Claude and
GPT group only, and the poller stops at the first endpoint that succeeds,
so the Gemini group never reached the limits. cloudcode-pa returns both
groups.
The daily endpoint returns the "Gemini 4 Argon" quota group only when the
request carries the CLI-style User-Agent (antigravity/cli/<version>), and
the production endpoint never returns it. Production still has to stay the
source for the groups it does return, because its Gemini weekly value is the
one shown by the official clients.

Send antigravity/cli/1.4.0 on all Antigravity requests, and after a
successful production poll also query the daily endpoint and append only the
groups production lacks. A failing daily call is logged and ignored, and a
failing production call still falls through to daily alone, so behaviour is
no worse than before. The headline 5h/weekly pair is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYP1wUrFhstiSe86HRgxRv
Why: Production cloudcode-pa currently returns static remainingFraction=1.0 and resetTime=now+window for the Gemini quota group, freezing the Gemini quota display at 100% remaining. Official agy CLI queries daily-cloudcode-pa which returns actual quota fractions and real reset timestamps for Gemini, Claude and GPT, and Gemini 4 Argon. We query daily first to get accurate quota across all groups, and keep production as a fallback and to supplement any groups missing in daily.
@yo-xe

yo-xe commented Oct 20, 2026

Copy link
Copy Markdown
Author

Updated the endpoint preference order to query daily-cloudcode-pa before production cloudcode-pa.

Rationale

In live verification against Google's backend:

  • The production endpoint currently returns static values for the Gemini Models group (remainingFraction = 1.0 and resetTime = request_time + window), causing the Gemini quota indicator to stay frozen at 100%.
  • In contrast, the official agy CLI queries daily-cloudcode-pa, which returns actual consumed quota fractions and real reset timestamps matching the CLI's /usage command.
  • Querying daily first provides accurate numbers across Gemini, Claude and GPT, and Gemini 4 Argon groups, while keeping production as a fallback and to supplement any groups daily might omit.

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.

Show every Antigravity quota group, including Gemini 4 Argon

1 participant