Antigravity
Configure Google OAuth, connect Antigravity, verify onboarding, and handle quota or capacity errors.
Antigravity (antigravity, alias ag) sends requests to Google's Cloud Code backend the way the Antigravity IDE does. It signs in with a Google account through OAuth and serves Gemini, Claude, and GPT models that Google exposes to that account, plus one image model.
The provider page shows a risk notice: this is a subscription session that was not licensed for router use, and Google can restrict the account. Use an account you can afford to lose.
Before you connect
The Google OAuth client is not bundled. ANTIGRAVITY_OAUTH_CLIENT_ID and ANTIGRAVITY_OAUTH_CLIENT_SECRET are unset by default. Set both in the environment DurinDoor starts with, then restart. With empty values Google rejects the authorize request.
export ANTIGRAVITY_OAUTH_CLIENT_ID="CHANGE_ME"
export ANTIGRAVITY_OAUTH_CLIENT_SECRET="CHANGE_ME"Keep those values available for token refresh and quota checks. Changing them later invalidates refresh for connections made with the old client. See Environment variables.
Connect
Open Providers, then Antigravity, then Connect.
Sign in with Google and approve the scopes. The request asks for offline access, so Google returns a refresh token.
Google redirects to http://localhost:<dashboard port>/callback. If you opened the dashboard on a loopback host, the popup finishes on its own. From any other host, the modal switches to a paste step: copy the full callback URL from the browser (/callback?code=...) and paste it back.
The connection can be saved before Google project onboarding finishes. If the project is missing, DurinDoor retries onboarding in the background and looks it up again before routing. Wait for onboarding and verify a request before treating the connection as ready.
The agy id
agy ("Antigravity CLI") uses the same executor, models, quota fetcher, and Google token refresh as antigravity, under a separate id. It exists so credentials imported from the Antigravity CLI do not collide with dashboard IDE logins. The dashboard has no Connect flow for agy; it is for connections that already exist.
Models
Send ag/<model>, for example ag/gemini-3.8-flash. Available models include thinking variants and image models; use discovery rather than a fixed count. Image models never stream. GET /v1/models shows what your connections actually expose.
Quota
The Quota Tracker shows one row per model from Cloud Code's available-models call, plus two weekly rows: Gemini Weekly and Claude & GPT Weekly. When Google answers 429 with a reset timestamp or delay, DurinDoor uses that value for the cooldown instead of guessing.
Errors
| Upstream says | What DurinDoor does |
|---|---|
503 MODEL_CAPACITY_EXHAUSTED or "No capacity available for model" | Treated as Google-side capacity, not an account problem. Falls back to the next account with no cooldown, and sweeps all accounts again up to two times. |
403 "has not been used in project", SERVICE_DISABLED, accessNotConfigured | Treated as a project setup problem. Falls back with no cooldown. Finish onboarding or enable the API in that project. |
| 403 saying the account is disabled, suspended, or in breach of terms | Normal two minute cooldown. Reconnecting will not help. |
| 429 | Cooldown from Google's reset hint when present, otherwise exponential backoff. |
The project-403 check currently matches antigravity and gemini-cli only, so an agy connection gets the normal cooldown for the same error.
MITM mode
A separate feature lets the Antigravity IDE itself route through DurinDoor. CLI Tools links to MITM Proxy (/dashboard/mitm), which installs a local root certificate, redirects cloudcode-pa.googleapis.com and daily-cloudcode-pa.googleapis.com to DurinDoor, and maps the IDE's model names to any DurinDoor model. It needs sudo for the certificate and DNS steps. It does not need an Antigravity connection. Recovery steps for a stuck redirect are on Troubleshooting.
Confirm a short request on Usage after connecting. For an empty-client OAuth error, set both client variables and restart. For project setup errors, finish onboarding or enable the required API. Account suspension cannot be repaired by repeating OAuth.