Skip to content

Restore Gemini quotas in the Antigravity collector - #19834

Closed
Ronin11 wants to merge 1 commit into
omacom:quattrofrom
Ronin11:fix-antigravity-gemini-quota
Closed

Ronin11 wants to merge 1 commit into
omacom:quattrofrom
Ronin11:fix-antigravity-gemini-quota

Conversation

@Ronin11

@Ronin11 Ronin11 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What changes

Fixes #16906.

The Agents panel on Omarchy 4.5.0-3 showed 0% used for both Gemini windows while Antigravity CLI 1.5.14 showed 85% of the weekly quota used on Google AI Pro. The stock collector sends an unversioned User-Agent, so Google's quota summary returned only Claude/GPT buckets. The parser used the first group as the Gemini plan when the real group was absent.

This patch sends a known compatible versioned User-Agent without invoking the lazy agy launcher, recognizes the Gemini plan group explicitly, and invalidates cached limits that could contain mislabeled buckets. Claude/GPT and Argon remain separate allowances. The fixed header works with sign-ins maintained by other harnesses without starting the Antigravity CLI.

Verification

  • The live patched collector returned Gemini percentages and the same reset times as the native CLI. The running Agents panel displayed about 12% session and 87% weekly used after additional activity.
  • All focused Antigravity tests passed. The broader suite's 26 failures also reproduced on the unmodified upstream checkout.

Reproduction and live verification on the upstream issue

Screenshots

The collector changes the values displayed by the existing meters. The live before-and-after readings are recorded above.

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Restores Gemini quota requests with a fixed, versioned client header.

  • The Agents panel shows Gemini quota from the named Gemini plan group.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Restore Gemini quotas in the Antigravity..." · Reviewed by Greptile

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

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (reasoning effort not exposed) reviewed the collector, cache handling, request headers, omp integration and competing diffs. Opus 5.5 High and muse-wonder via pi, thinking high, found no remaining source defects in their final review; review independence is not guaranteed. No changes were pushed.

On a disposable Omarchy worker, the CLI suite and all 128 assertions across the Antigravity limits, harness, scanner, timestamp and agent-partition tests passed. My separate reproduction produces the wrong plan meters and retains wrongly cached values on the base, passes at e49ffb6, and fails again with the fix reverted. After correcting the worker's PATH, 62 Node-dependent test files passed. The broader suite's four remaining failures—ASCII width, About animation, owner-setup branding and runtime-smoke IPC—also reproduce with both changed files restored from base fee089f. CI is green.

The captures show collector-produced fixture records in the running Agents panel: empty Gemini meters before, then 10% session and 85% weekly usage with a separate Argon marker after. Reverting the fix restores the empty meters. These checks use simulated API responses; no authenticated Google quota requests were made.

Before: fixture Claude/GPT quotas appear as empty Gemini plan meters

After: fixture Gemini quotas fill their plan meters and Argon has its own marker

This overlaps #16642, #16912, #16999, #17636, #17825 and #18730. It remains open and is waiting on the maintainer to resolve the competing fixes; #16912 already carries the ready label.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 23, 2026
sjug added a commit to sjug/omarchy that referenced this pull request Nov 24, 2026
Google leaves the Gemini group out of retrieveUserQuotaSummary for an
unversioned client, so a Google AI Pro plan showed no weekly limit. These
lines are omacom#19834's own, ahead of its merge, so that merge
stays clean.
@IMNOTAKAU

Copy link
Copy Markdown

Confirmed on Google AI Ultra (g1-ultra-lite-tier), Omarchy 4.5.0-3 (kernel 7.2.15-4-omarchy), agy 1.5.17:

  • Before (stock collector with User-Agent: antigravity): v1internal:retrieveUserQuotaSummary returns only the Claude and GPT models group (3p-5h and 3p-weekly at remainingFraction: 1 with no resetTime), and extract_limits() falls back to groups[0], so the Agents panel shows 0% for both Session and Weekly with blank reset times despite active Gemini usage.
  • After (versioned User-Agent: antigravity/cli/1.5.17, explicit Gemini group matching, and invalidated cache key): v1internal:retrieveUserQuotaSummary returns Gemini Models (gemini-5h and gemini-weekly) alongside Claude and GPT models, and the Agents panel displays the real Session (~20%) and Weekly (~5%) usage meters with their actual reset timestamps.

@omarchybot

Copy link
Copy Markdown
Collaborator

Current quattro already includes #19866’s protection against treating Claude/GPT as Gemini and #19908’s five-hour quota fallback. This PR still adds the versioned request header and keeps Argon out of the primary Gemini group, but conflicts with the collector and the removed agent-usage-agy-limits-test.sh; any update would need to preserve the newer fallback and move the relevant cases into agent-usage-agy-test.sh.

The older #18730 addresses the same remaining quota bug. Current Omarchy installs agy as a package, so the earlier concern that its version probe triggers Omarchy’s lazy installer no longer applies. This PR’s cache invalidation additionally prevents pre-fix, mislabeled meters from surviving a failed refresh. I queued that improvement for review in #18730’s own session, with credit to Ronin11 if incorporated.

GPT-6 in Codex (reasoning effort not exposed) compared the current collector, cache behavior, comments and competing diffs. Opus 5.5 High and muse-wonder via pi, thinking high, both recommended carrying forward #18730 under the rule favoring the older similar fix; reviewer independence is not guaranteed. They differed on whether to retain cache invalidation: the stale fallback reads old values after the freshness interval, which is why I handed it over for consideration. No tests or live Google requests were rerun, and no changes were pushed. This PR remains open, waiting on the maintainer’s choice between the competing fixes.

omarchybot added a commit to piyushbodaa/omarchy that referenced this pull request Nov 25, 2026
Preserve the missing-Gemini model fallback and current tests while excluding Argon from the plan group. Keep installed version probing, floor old or unreadable releases at a compatible version, and prevent the probe from inheriting stdin. Isolate the fake-HTTP tests from installed CLIs.

Carry the compatible release, allowance case and cache invalidation from omacom#19834. A failed refresh can retain incorrectly labeled plan meters after their freshness interval; the new namespace stops those values returning as stale data.

Co-Authored-By: Nate Ashby <nate.ashby11@gmail.com>
Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
Co-Authored-By: muse-wonder via pi, thinking high <noreply@meta.com>
@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

4 participants