Skip to content

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

Merged
CodeZeno merged 5 commits into
CodeZeno:mainfrom
yo-xe:antigravity-argon
Oct 25, 2026
Merged

CodeZeno merged 5 commits into
CodeZeno:mainfrom
yo-xe:antigravity-argon

Conversation

@yo-xe

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

Copy link
Copy Markdown
Contributor

Summary

Closes #172

  • Add the 5h and weekly buckets of every Antigravity quota summary group to UsageData.limits. The key is limit_slug(group) plus the window. Themes can then show groups other than the two headline pools, for example Gemini 4 Argon.
  • Do not use the Gemini 4 Argon group as the main Gemini pool. Its name contains "gemini", but it has its own quota pool. Without this rule, the headline Gemini values can come from Argon when Argon is listed first.
  • Send antigravity/cli/1.4.0 as the User-Agent. The daily summary returns the Gemini 4 Argon group only for this agy CLI form.

The branch now follows the design of #177 and #178: the first endpoint that returns a summary is authoritative, and the poller does not merge endpoints. The earlier endpoint-order and production-merge changes are removed.

Testing

  • cargo fmt --check: pass.
  • cargo test: 559 passed, 3 failed. The same 3 tests also fail on unmodified v2.20.0 (b1dfecc) on my machine (Japanese Windows UI language): studio_app::tests::version_text_and_trailing_icon_share_one_update_button, studio_app::tests::diagnostics_page_has_logging_controls_and_menu_version and poller::retry_after::tests::oversized_headers_store_bounded_cooldowns_and_requests_resume_after_expiry.
  • New regression test antigravity_summary_exposes_every_group_and_window_as_limits uses dummy data, with Argon listed first.
  • Live check with my account, from a local test that I did not commit: with antigravity/cli/1.4.0, limits contains gemini_models_*, claude_and_gpt_models_* and gemini_4_argon_weekly. With antigravity/2.24.0, the gemini_4_argon_weekly limit is not returned.

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
Contributor 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.

@rouninnomi

Copy link
Copy Markdown

+1 for this feature! Having Gemini 4 Argon tracked separately via limits (with the CLI User-Agent) would be super helpful since Argon has its own independent quota pool in Antigravity.

Just a heads-up for @yo-xe: it looks like src/poller/antigravity.rs currently has merge conflicts after #177 and #178 landed on main. A rebase onto the latest main would be much appreciated so this can be reviewed and merged!

… design

authoritative, so this branch drops its own endpoint order and the
production merge. What stays: every group and window as UsageLimit,
Argon kept out of the main Gemini pool, and the agy CLI User-Agent
that the daily summary needs to return the Gemini 4 Argon group.
@yo-xe

yo-xe commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up. I merged main (v2.20.0) into this branch and resolved the conflict in src/poller/antigravity.rs. The branch now follows the single-source summary design of #177 and #178, and the PR adds only the per-group limits, the Argon exclusion from the main Gemini pool, and the agy CLI User-Agent. I updated the description with the test results.

@rouninnomi

Copy link
Copy Markdown

Thanks so much for the swift update, @yo-xe!

The conflict resolution and clean alignment with the single-source summary design from #177 / #178 look great. Really appreciate your quick turnaround and effort on this—looking forward to seeing it merged!

@CodeZeno
CodeZeno merged commit d2c700c into CodeZeno:main Oct 25, 2026
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

3 participants