Repository navigation
Conversation
…its Gemini windows
[Medium impact] The change affects quota summaries used by the Antigravity usage collector. Handle installed versions below Findings
SummaryThe collector now sends a CLI-shaped
Reviews (1) · Last reviewed commit: "Name the Antigravity CLI in the quota re..." · Reviewed by Greptile |
| if named: | ||
| version = named.group(0) |
There was a problem hiding this comment.
Older installs miss Gemini windows
If the installed agy reports a version below 1.2.0, client_user_agent() replaces the working fallback with that version. Google then omits Gemini windows, as the new comment explains. Omarchy supports user-managed CLI installs without requiring a minimum version, so the fix remains incomplete for those users.
Keep the fallback when the reported version is below 1.2.0, and cover that case in the test.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
GPT-6 High in Codex reviewed the collector, fixtures, and overlapping fixes, including #18730 and #20114. The proposed collector identifies itself as Google's consumer CLI even when the CLI is absent, and sends that identity on plan and fallback requests as well as the quota summary. This waits on a maintainer decision about a supported source for the quota data. Google Antigravity terms, section 6 · Official CLI quota display Opus 5.5 High agreed after a separate source review, whose independence is not guaranteed, and found that an Argon-first reply can still put Argon's number in the main Gemini meter. The new fixtures supply the same quota data regardless of the header. This was a source review without worker tests or live requests to Google. |
|
Superseded by #20916, which delegates to |
What changes
Fixes #20482.
omarchy-agent-usage-agyaskedv1internal:retrieveUserQuotaSummarywithUser-Agent: antigravity. Google decides which quota groups to answer with from the client identity, and that User-Agent gets an answer holding only the "Claude and GPT models" group: the plan's own "Gemini Models" group is left out, so on a Google AI Pro account the panel showed Antigravity at 0% with no reset time whileagy -p '/usage'showed 96% / 87% remaining.The collector now names the CLI and the version it reports, the way
agyitself does (antigravity/cli/1.5.18 (aidev_client; …)), falling back to a full three-part version whenagyis not on PATH. Measured against the same token and body, only the User-Agent differs:antigravity["Claude and GPT models"]antigravity/cli/1.5.18 (aidev_client; os_type=linux; arch=amd64; auth_method=consumer)["Gemini Models", "Claude and GPT models"]The version is load-bearing:
antigravity/cli/1.5andantigravity/cli/1.6(no patch level),antigravity/cli/1.0.0and1.1.9all get the Claude-only answer, while1.2.0and up get both groups, which is why the fallback keeps a full version rather than the bare name.Nothing else in the collector changes: with the Gemini group in the answer,
extract_limits()fills Session/Weekly from it as before, and theretrieveUserQuotafallback still covers Google AI Ultra, where the summary really does omit Gemini.Verification
./test/shell.d/agent-usage-agy-test.sh— all 8 checks pass, including two new ones: the request carriesantigravity/cli/1.5.20 (aidev_client; auth_method=consumer)when the stubbed CLI reports1.5.20, and a full three-part version when there is no CLI to ask.On the reporter's machine (Omarchy 4.5.0-3, Google AI Pro), with the patched collector installed:
omarchy-agent-usage-update --force agy, then the record readagainst
agy -p '/usage'at the same moment: 86% remaining / reset2026-11-28T00:08:49Zand 95% remaining / reset2026-12-04T19:08:49Z(used = 100 − remaining). Before the patch the same record read0.0for both windows with emptyresetsAt.The CLI's own request shape was confirmed by intercepting its traffic with a local proxy (
HTTPS_PROXY+SSL_CERT_FILE), not inferred: it sends that User-Agent todaily-cloudcode-pa.googleapis.com;cloudcode-pa.googleapis.comanswers identically given the same UA.Screenshots
No visible change: the panel renders the same meters, now with the plan's real numbers instead of zeros.