Skip to content

Label an Antigravity answer with no Gemini group as allowances only - #16912

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:agy-quota-claude-gpt-mislabel
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:agy-quota-claude-gpt-mislabel

Conversation

@AnPod

@AnPod AnPod commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #16906 (the misidentification part)

Problem

omarchy-agent-usage-agy's extract_limits picks the plan's group with next(..., groups[0]) — when no group's name contains "gemini", the first group stands in for Gemini. Google's quota endpoint can answer with the Claude and GPT models pool alone (the reporter captured such a payload), and then the 3P 3p-5h / 3p-weekly buckets are displayed as the plan-level Session (5-hour) and Weekly (7-day) meters, while the pool's own correctly-named allowance lines vanish.

Fix

When no group matches "gemini", no plan group is selected: the fallback to groups[0] is dropped, the plan's Session/Weekly meters are simply absent, and the answer's groups keep their own allowance labels in the existing second pass (Claude/GPT Weekly, …). The synthetic-Gemini path for a groups-less answer is untouched, and so is every other shape.

The issue's other two asks — surfacing the Gemini 4 Argon bucket and reading quotas through the agy CLI RPC — are a larger change already covered by open PR #16642; this PR only fixes the mislabeling and composes with it.

Test

New case in test/shell.d/agent-usage-agy-limits-test.sh: a groups payload with only Claude and GPT models yields [("Claude/GPT Weekly", 0.02)] — without the fix it yields [("Session (5-hour)", 0.0), ("Weekly (7-day)", 0.02)] (verified red before the fix, green after). All 44 agent-usage-* test files pass.

Google's quota endpoint can answer with the Claude and GPT pool alone.
extract_limits fell back to groups[0] when no group said Gemini, so the
3P windows wore the plan's Session (5-hour) and Weekly (7-day) labels
and their Claude/GPT lines vanished. With no Gemini group the plan's
meters are simply absent and the pool keeps its own allowance labels.

Fixes omacom#16906
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Fixes Antigravity quota labels when Google returns groups without Gemini.

  • Antigravity keeps Claude and GPT allowances out of plan meters.

No actionable issues found. Test coverage was inspected; tests were not run.

Acknowledged scope: AnPod explicitly deferred Gemini 4 Argon support and quota reads through the agy CLI RPC to PR #16642.

Reviews (1) · Last reviewed commit: "Label an Antigravity answer with no Gemi..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 3, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 44e06ef, nothing found to change.

Reproduced on an Omarchy worker VM. The new case in test/shell.d/agent-usage-agy-limits-test.sh fails against the quattro collector, which shows the Claude and GPT pool's 3p-5h / 3p-weekly buckets as Session (5-hour) 0.0 and Weekly (7-day) 0.02. It passes at this head. ./test/cli and all 44 agent-usage-* test files pass at this head merged with current quattro (8d07724), which merges cleanly.

Second opinion: Codex Medium and muse-wonder (via pi, thinking high) both reviewed it and found no defects. They agreed with my reading, though their independence from it is not guaranteed. They checked both callers of extract_limits: the direct quota call, and omp_usage, whose omp labels are still Gemini. They also checked that group is gemini is safe when gemini is None, and that the synthetic Gemini group for an answer without groups is untouched.

Two things for whoever merges, neither a defect in this change:

Waiting on the maintainer.

@dhh

dhh commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Superseded by #20916, which delegates to agy -p /usage --output-format json instead of calling Google's private API directly or spoofing User-Agent headers. Thanks for the contribution!

@dhh dhh closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-agent-usage-agy misidentifies Claude/GPT quota as Gemini Session/Weekly and omits Argon bucket

3 participants