docs/guides/ANTIGRAVITY-ONBOARDING.md
What you get: Access to Gemini 3.1 Pro, Gemini 3.5 Flash, Claude Sonnet 4.6, and other models through your Google One AI Pro subscription — routed through OmniRoute as a unified gateway.
Official references:
Both providers share the same Google backend — identical OAuth client, token refresh, endpoints, and Google accounts. The difference is what models you see.
See Antigravity CLI announcement for Google's official comparison.
| Aspect | antigravity (IDE) | agy (CLI) |
|---|---|---|
| Google product | Antigravity 2.0 / Antigravity IDE | Antigravity CLI |
| Backend | Same Google Cloud Code API | Same Google Cloud Code API |
| OAuth / Token | Same client, same refresh | Same client, same refresh |
| Model catalog | Static curated list (OmniRoute hardcoded) | Live-probed from Google via :fetchAvailableModels |
| Claude models | Sonnet 4.6, Opus 4.6 (4 variants each) | Sonnet 4.6, Opus 4.6 (4 variants each) |
| Gemini naming | Clean labels (Low/Medium/High) | Upstream IDs (extra-low/low/agent) |
| Extra models | gpt-oss-120b-medium | May include additional models from Google |
| Default use case | IDE integration (VS Code, JetBrains) | CLI / API access |
| Quota | Shared with agy (same Google account) | Shared with antigravity (same Google account) |
Available models (verified via experiment, 2026-07-29):
Why the model catalog differs: Google's CLI is "optimized for speed and low overhead" and "co-optimized with Gemini models" (per Google's official blog). The Web/IDE product is "optimized for comprehensiveness." The CLI uses :fetchAvailableModels to dynamically discover models, while the IDE uses a static curated list.
In practice: Use agy/ prefix for Gemini models (e.g. agy/gemini-3.5-flash-high). Use antigravity/ for the static curated list. Both hit the same Google backend, but expose different model naming. The quota is shared — using either provider counts against the same Google account's limits.
See Antigravity Docs: Plans for official quota details and Changes to Antigravity Plans for the latest pricing updates.
Google Antigravity uses a dual-layer quota based on "Work Done" (computational weight), not message count.
| Layer | What it is | Refresh cycle |
|---|---|---|
| 5-hour sprint | Immediate pool of "work done" | Resets 5 hours after first request in a session |
| 7-day baseline | Weekly hard cap | Overrides 5-hour refresh if hit; locks out until next 7-day period |
How "Work Done" is calculated: Agent-heavy tasks (e.g. "Refactor this entire repository") drain quota much faster than simple tasks (e.g. "Fix this function"). There is no real-time dashboard showing consumption.
| Plan | Price | Quota | Weekly limit |
|---|---|---|---|
| Free | $0 | Meaningful quota, refreshed weekly | Yes |
| AI Pro | $19.99/mo | High quota, 5-hour rolling refresh | Yes (overrides 5-hour if hit) |
| AI Ultra 5x | $99.99/mo | 5x Pro quota | No weekly limit |
| AI Ultra 20x | $199.99/mo | 20x Pro quota | No weekly limit |
See Google One AI credits for how credits work.
When baseline quota is exhausted:
Credits are purchased separately and deducted at standard API pricing.
When your account is exhausted: OmniRoute automatically retries with the next available account in the combo route. No manual intervention needed.
Every antigravity/agy connection needs a Google Cloud Code projectId. Without it, the /v1internal:models endpoint returns 404.
OmniRoute handles this automatically. When you add a new Google account via Dashboard OAuth:
loadCodeAssist to discover the projectIdonboardUser to create oneloadCodeAssist to get the newly created projectIdThis works for most accounts — no manual steps needed.
If automatic discovery fails (see Section 5 for when this happens):
# Install agy CLI (if not already)
npm install -g @anthropic-ai/agy
# Login with your Google account
agy login
# Select the account that needs onboarding
# This triggers Cloud Code registration and assigns a projectId
After agy login succeeds, refresh the token in OmniRoute Dashboard. The projectId will be discovered automatically.
Check the database:
# Inside OmniRoute container
node -e "const db=require('better-sqlite3')('/app/data/storage.sqlite'); \
console.log(JSON.stringify(db.prepare(\
'SELECT email,project_id FROM provider_connections WHERE provider=\"agy\"'\
).all(), null, 2))"
Or check the logs:
podman logs omniroute 2>&1 | grep "projectId discovered"
Google OAuth requires a valid redirect URI. OmniRoute's default uses http://127.0.0.1:20128/callback (loopback). This works for local builds but fails for remote deployments (e.g., a server accessed via LAN IP).
Google rejects redirect URIs that:
.com, .org, etc.)Option A: Use the built-in OAuth flow (default)
localhost or 127.0.0.1Option B: Custom OAuth credentials
ANTIGRAVITY_OAUTH_CLIENT_TYPE=web in your environmentGOOGLE_OAUTH_CLIENT_ID=your-client-id
GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret
https://your-domain.com/callback as an authorized redirect URI in Google Cloud ConsoleOption C: Use agy CLI for initial login
agy login on the machine that will access OmniRouteOmniRoute handles projectId discovery and onboarding automatically for most accounts. When it fails, the root cause is usually one of these:
Symptom: agy login returns "Eligibility check failed: Your current account is not eligible for Antigravity, because it is not currently available in your location."
Root cause: Google accounts have a backend "Country Association" field set at registration time. The agy CLI and Cloud Code API check this field strictly — unlike web Gemini which only checks your current IP.
To check or change your account's associated region, visit Google Country Association Form.
Why web Gemini works but agy doesn't:
Fix:
agy login should succeedSymptom: Logs show loadCodeAssist returned no project id and onboardUser failed (400).
Root cause: The account has never been registered with Google Cloud Code, and the automatic onboarding failed.
Fix: Run agy login manually to trigger Cloud Code registration, then refresh the token in OmniRoute Dashboard.
Symptom: 401 errors in logs, or "Token has expired" messages.
Fix: Refresh the token in Dashboard → Providers → agy → Click refresh icon. If the refresh token itself is revoked, you'll need to re-authenticate via OAuth.
Account not working?
│
├─ Does it have a projectId in the database?
│ ├─ YES → Problem is elsewhere (token expired, rate limit, etc.)
│ └─ NO ↓
│
├─ Is the account's Country Association set to a restricted region?
│ ├─ YES → Change region at Google Country Association Form
│ │ (https://policies.google.com/country-association-form)
│ │ Wait 1-24 hours, then retry
│ └─ NO ↓
│
├─ Does the account have Google One AI Pro subscription?
│ ├─ NO → Subscribe first at one.google.com
│ └─ YES ↓
│
├─ Try automatic discovery (refresh token in Dashboard)
│ ├─ Works → Done
│ └─ Still fails ↓
│
└─ Manual: Run `agy login` on the machine
├─ Works → Refresh token in Dashboard, projectId discovered
└─ Fails → Check error message, likely region or subscription issue
| Task | Command / URL |
|---|---|
| Change account region | Google Country Association Form |
| agy CLI login | agy login |
| Check projectId in DB | SELECT email,project_id FROM provider_connections WHERE provider='agy' |
| Check logs | podman logs omniroute 2>&1 | grep projectId |
| Refresh token | Dashboard → Providers → agy → Click refresh icon |
Last updated: 2026-07-31. Based on OmniRoute v3.8.50.