Antigravity OAuth Errors — Fix 'Version No Longer Supported' and Authentication Issues
Fix the 'This version of Antigravity is no longer supported' error and other Google Antigravity OAuth issues. Includes user-agent patch fix and multi-account setup.
⚠️ The Problem
You're seeing the error message: 'This version of Antigravity is no longer supported. Please update to receive the latest features!' when using Google Antigravity as your model provider. Alternatively, you may be experiencing OAuth authentication failures, Gmail configuration errors, rate limit timeouts, or issues setting up multiple Antigravity accounts.
🔍 Why This Happens
Google periodically deprecates older API client versions. The Antigravity integration uses a User-Agent string that identifies the client version. When Google blocks an old version, you get this error. The root cause is that the @mariozechner/pi-ai library (which handles Antigravity) has a hardcoded User-Agent set to antigravity/1.11.5 which Google no longer accepts. Other causes include: OAuth tokens expiring, incorrect Gmail OAuth configuration placement in config files, or using browser session tokens instead of proper setup tokens.
✅ The Fix
Fix 'Version No Longer Supported' Error
This is the most common Antigravity issue. Google blocked the old User-Agent version. Here's how to fix it:
Step 1: Locate the File to Patch
The User-Agent is hardcoded in the pi-ai library. Find it based on your OS:
Windows (npm install):
C:\Users\YOURUSER\AppData\Roaming\npm\node_modules\openclaw\node_modules\@mariozechner\pi-ai\dist\providers\google-gemini-cli.jsWindows (pnpm):
C:\Users\YOURUSER\AppData\Local\pnpm\global\5\node_modules\openclaw\node_modules\@mariozechner\pi-ai\dist\providers\google-gemini-cli.jsmacOS/Linux (npm):
~/.npm-global/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.jsmacOS/Linux (source build):
~/moltbot-ref/node_modules/.pnpm/@mariozechner+pi-ai@0.45.3_*/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.jsStep 2: Edit the User-Agent
Open the file and find this line (around line 26):
"User-Agent": "antigravity/1.11.5 darwin/arm64",Change it to:
"User-Agent": "antigravity/1.15.8 darwin/arm64",Step 3: Restart the Gateway
openclaw gateway restart# orclawdbot gateway restartThat's it! The error should be resolved.
Alternative: Switch to Direct Gemini API
If patching doesn't work or you want a more stable solution, use a direct Gemini API key instead of Antigravity:
clawdbot configureSelect Google Gemini (direct API) instead of Antigravity. You'll need a Gemini API key from https://aistudio.google.com/apikey
Model IDs for direct Gemini:
google-gemini/gemini-1.5-progoogle-gemini/gemini-1.5-flash(cheaper/faster)google-gemini/gemini-2.0-flash-exp
Fix Gmail OAuth Configuration Errors
If you see: error: too many arguments for 'setup'. Expected 0 arguments but got 1.
The Gmail OAuth config goes at the root level of your config file, NOT inside skills.entries:
Correct placement in ~/.clawdbot/config.json5:
{ "meta": { ... }, "models": { ... }, // Gmail config at ROOT level "gmail": { "clientId": "YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com", "clientSecret": "YOUR_GOOGLE_CLIENT_SECRET" }, "channels": { ... }, "skills": { ... }}Google Cloud Console Setup:
- Create a project at https://console.cloud.google.com/
- Enable Gmail API
- Create OAuth 2.0 credentials (Desktop app type)
- Add
http://127.0.0.1:5316as authorized redirect URI - Download client ID and secret
Then authenticate:
clawdbot gmail loginFix OAuth Token Errors (API Key vs Setup Token)
If you see: HTTP 401: authentication_error: invalid x-api-key
Use the correct token type:
- ✅ Use
sk-ant-oat01-...tokens (fromclaude setup-token) - ❌ Don't use
sk-ant-sid02-...tokens (browser session cookies - they're short-lived and fragile)
To get the correct token:
claude setup-tokenThis generates a proper OAuth token that won't expire randomly.
Setting Up Multiple Antigravity Accounts
If you see: Profile google-antigravity:email@gmail.com timed out (possible rate limit). Trying next account...
OpenClaw supports multiple Google accounts for failover. Configure in auth-profiles.json:
{ "google-antigravity": [ { "email": "account1@gmail.com", "token": "..." }, { "email": "account2@gmail.com", "token": "..." } ]}When one account hits rate limits, OpenClaw automatically tries the next account.
To add a second account:
clawdbot configure# Select Google Antigravity# Log in with your second Google account# It will be added to the profile listRate Limit Cooldowns
Antigravity has aggressive rate limits. If you keep hitting cooldowns:
- Add more accounts for failover (see above)
- Reduce request frequency - space out your requests
- Use a fallback model - configure a backup like OpenRouter:
{ agents: { defaults: { model: { primary: "google-antigravity/gemini-2.0-flash-exp", fallbacks: ["openrouter/google/gemini-2.0-flash-exp:free"] } } }}Full Troubleshooting Checklist
# 1. Check your versionopenclaw --version# 2. Check gateway statusopenclaw status --all# 3. Probe the Antigravity provideropenclaw models status --probe --probe-provider google-antigravity# 4. Watch logs for errorsopenclaw logs --follow# 5. Restart after any config changesopenclaw gateway restart🔥 Your AI should run your business, not just answer questions.
We'll show you how.Free to join.
📋 Quick Commands
| Command | Description |
|---|---|
| openclaw gateway restart | Restart the gateway after patching the User-Agent |
| clawdbot configure | Re-run configuration wizard to refresh OAuth tokens |
| clawdbot gmail login | Start Gmail OAuth authentication flow |
| claude setup-token | Generate a proper OAuth token (not browser session) |
| openclaw models status --probe | Test connection to configured model providers |
| openclaw status --all | Show full diagnostic status including auth |
| openclaw logs --follow | Watch gateway logs in real-time for auth errors |
Related Issues
📚 You Might Also Like
Is Your OpenClaw Exposed? How to Check and Fix It in 30 Minutes
Right now, there are over 42,000 OpenClaw instances visible on the public internet — most with no authentication at all. The researchers who found this des...
How to Update OpenClaw (3 Easy Methods)
Keep your AI assistant running the latest version. Three ways to update — from one-word commands to manual CLI.
GitHub
Connect OpenClaw to GitHub for AI-powered development workflows. Review PRs, manage issues, and automate code tasks with natural language.
OpenClaw Help: Troubleshooting Guide & Support Resources
Need help with OpenClaw? Common issues, troubleshooting steps, and where to get support when you're stuck.
🐙 Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.Free to join.
Join Vibe Combinator →