Repository navigation
fix(antigravity): request quota summary with the CLI fingerprint so Argon usage shows - #7804
Conversation
…rgon usage shows Cloud Code Assist includes the Gemini 4 Argon group in retrieveUserQuotaSummary only for the CLI client family. Under the IDE User-Agent the same account reports just the Gemini and Claude groups, so the dashboard never showed Argon usage even when Argon was the only model consuming quota. The models fallback keeps the IDE fingerprint and the 403 retry keeps antigravity/1.0.
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueNo actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Quota request User-Agent selection src/providers/quota/antigravity.ts, src/adapters/client-fingerprint.ts, tests/providers/provider-antigravity-quota-retry.test.ts, docs-site/src/content/docs/reference/configuration/providers.md, structure/transports/inventory.md |
The quota-summary request uses the CLI User-Agent, while the models fallback explicitly uses the IDE User-Agent. Tests check the summary fingerprint and the parsed Argon weekly window. Documentation describes the request behavior and the retained 403 retry. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- lidge-jun/opencodex#7668: Changes the same Antigravity quota-summary request and its User-Agent fallbacks.
Suggested labels: bug
Merge Risk: 
Minimal · previous review 38994
-
No actionable merge-blocking risk remains from the reviewed change.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Maintainer
Marking ready and squash-merging. Refs #7500 (the paid/trial part stays open). |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
The Antigravity quota panel never shows Gemini 4 Argon usage. The summary probe sends the IDE User-Agent, and Cloud Code Assist returns the Argon group from
v1internal:retrieveUserQuotaSummaryonly to the CLI client family, the same CLI-only gate that already applies to Argon inference and model discovery (antigravityUserAgentForWireModel).Live check on one Pro account where almost all traffic was
gemini-4-argon:antigravity/ide/...(current)antigravity/cli/1.3.4 ...(this PR)So the dashboard showed four bars at 0% while the Argon weekly limit was a third gone. The CLI response is a superset of the IDE response, so the Gem/Cla bars are unchanged.
The parser already handles the Argon group (#7283,
structure/providers-and-adapters.md); this PR only changes which fingerprint asks for it:src/providers/quota/antigravity.ts: the summary request usesantigravityCliUserAgent(). The 403 retry still usesantigravity/1.0, and thefetchAvailableModelsfallback keeps the IDE UA (under the CLI UA that list drops the Claude rows). Argon windows stay display-only, as before.structure/transports/inventory.md, docs-site provider reference, and theantigravityCliUserAgentdoc comment now say the CLI fingerprint is used for the quota summary too.#7668 includes this same User-Agent change together with label, auth-surface, and failover changes and is currently blocked on review. This PR takes only the quota fingerprint fix so it can land on its own; the maintainer's round-2 review there named the CLI fingerprint as one of the parts not yet covered. Refs #7500.
Verification
bun test tests/providers/provider-antigravity-quota-retry.test.ts tests/providers/provider-quota.test.ts tests/providers/provider-account-quota.test.ts tests/providers/provider-antigravity-model-quota.test.ts tests/routing/jev-quota-antigravity.test.ts tests/server/provider-account-quota-routes.test.ts: 311 pass, 0 fail.summary is requested with the CLI fingerprint so the Argon group is reportedreplays the live response shape and expects anArgon (Weekly)window taggedgemini-4-argon. With the source change reverted, the retry test file fails (16/16) because the summary call goes out with the IDE UA.bun x tsc --noEmit,bun scripts/structure-ssot.ts,bun scripts/privacy-scan.ts: pass.bun run test(Bun 1.4.4, macOS arm64): every file passes excepttests/ci-workflows/release-helper.test.ts(28 failures, allposix_spawn 'git' ENOENTfrom the runner's PATH on this machine). That file passes 40/40 when run alone, both with and without this change; it does not touch this diff.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit