Repository navigation
fix(server): stop reading Antigravity usage limits from Google's internal APIs - #43026
Conversation
…rnal APIs Antigravity only supports ACP for external clients, and Google confirmed that calling its internal APIs can flag a user's account. T3 Code read Antigravity quotas from cloudcode-pa.googleapis.com (locally and through CLIProxyAPI hubs), so remove the quota probe, the hub reader, and the Antigravity-only window handling that interpreted those quotas. Local token history is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Google told T3 Code that calling its internal Cloud Code APIs can get an account flagged, and Antigravity exposes no quota API to external clients (pingdotgg/t3code#43026). Drop the Antigravity quota tab and the auth-file quota section, and make its adapter never select a file, so the dashboard stops calling retrieveUserQuotaSummary and loadCodeAssist. The rendering code stays for when ACP reports limits.
Resolve conflicts across AntigravityAdapterV2, AntigravityDriver, agentContextBudget, ProviderSetupSection, and deleted antigravityUsageLimits files (pingdotgg#43026, pingdotgg#42931, pingdotgg#42517, pingdotgg#42671). verification: 24 focused test suites passed, vp run i18n:check passed, vp run check:changed origin/nightly passed format, lint, knip, graphql, typecheck (43/43), and react compiler, unused patches verified with VP_HOME
|
Cross-referencing a relevant comment regarding this: #40015 (comment) can we use |
On agy 1.5.0, or when T3 cannot read the runtime version, the ACP handshake sent clientInfo name "zed" so agy would offer models it allowlists for Zed. Posing as another client breaks the same rule as #43026: use Antigravity only as itself, over ACP. Always send t3-code. The Antigravity provider page also still told users to open Usage > Limits for their Google allowances, which #43026 removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream PR pingdotgg#43026 removed direct calls to Google internal APIs for Antigravity usage limits. Restore usage limit reporting by invoking the official `agy -p /usage --output-format json` CLI command with the instance profile environment, 5-minute TTL caching, in-flight deduplication, and epoch-0 reset_time filtering. Implemented with Gemini 4 Neon via Antigravity harness.
Upstream PR pingdotgg#43026 removed direct calls to Google internal APIs for Antigravity usage limits. Restore usage limit reporting by invoking the official `agy -p /usage --output-format json` CLI command with the instance profile environment, 5-minute TTL caching, in-flight deduplication, and epoch-0 reset_time filtering. Implemented with Gemini 4 Neon via Antigravity harness.
#423) Pin the manager and workers to the T3 release containing pingdotgg/t3code#43026. Upstream removed the native and hub probes that requested private quota APIs and produced repeated Google sign-in prompts. Retire the homelab diagnostic that required quota windows and document the supported behavior. Verified release ancestry, the Linux x64 artifact digest and absence of both reported messages. `bun run check` passes.
This reverts commit 96423cb (pingdotgg#43026). Antigravity and Gemini usage limits keep showing, both for local instances and for Antigravity accounts pooled through a CLIProxyAPI hub. Adapted to later upstream changes: the Antigravity driver keeps the incompatible-runtime import added since, the hub tests read the { accounts, unreadProviders } result, the unread-provider test uses an unknown provider instead of antigravity, and the hub doc line lists Antigravity again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps the fork's Antigravity quota cards by restoring the code upstream removed in 96423cb (pingdotgg#43026), now guarded in scripts/fork-divergences.json.
|
Sharing another clean path that has been working well for us in domios.dev — might be useful here too alongside the Instead of reading OAuth tokens from the keyring or touching {
"statusLine": {
"type": "command",
"enabled": true,
"command": "curl -s --max-time 2 -X POST --data-binary @- http://127.0.0.1:<ephemeral-port>/<token>"
}
}How it behaves in practice:
Might be a nice zero-internal-API interim approach until ACP exposes quota natively. |
|
Can we add this back with new ToS chages? @juliusmarminge |
Don't think so, this is still an internal endpoint and afaict nothing changed about that. Reached back out to google contacts to confirm though |
|
https://x.com/rodydavis/status/2127795079528214756 Per @rodydavis Rody Davis, |

Antigravity supports only ACP for external clients. Google told us that calling its internal APIs can get an account flagged. T3 Code was reading Antigravity quotas from
cloudcode-pa.googleapis.com(retrieveUserQuotaSummary/fetchAvailableModels) in two places: the local provider probe and the CLIProxyAPI hub reader. Either one could get users in trouble.What changed
antigravityUsageLimits.tsand its tests. That file held the quota probe, the OAuth refresh, the keyring/Windows credential reads and the fakeantigravity/hubuser agent. I also removed its wiring fromAntigravityProviderandAntigravityDriver: the usage fiber, the republish deferred andonSignedIn.@t3tools/shared/usageLimits, the web thread details and serverUsageLimitSources, since nothing produces those windows anymore.@napi-rs/keyringfrom the server manifest. Only this probe used it; desktop still depends on it for browser cookie import.docs/user/usage.md.Local Antigravity token history (read from on-disk conversation databases, no network) is unchanged. Limits can come back once Antigravity exposes them over ACP; their team said they'd pass the request along.
Verification
Nothing here is visual: Antigravity now shows no limits, the same as other providers that don't report any. These pass:
apps/server:cliproxyApi.test.ts(including the new assertion that hub Antigravity accounts are never called),UsageLimitSources.test.ts,AntigravityProvider.test.ts,AntigravityDriver.test.tspackages/shared:usageLimits.test.tsapps/web:ThreadDetailsUsage.logic.test.tsvp run typecheck(server) andvp run check:changed(format, lint, knip)v1internalno longer appears anywhere outside.repos. The only remainingcloudcode-pamention is inAntigravityTurnOutcome.ts, which parses the rate-limit errors that the ACP runtime itself reports; it makes no requests.🤖 Generated with Claude Code