🦞OpenClaw Guide
Authentication

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.js

Windows (pnpm): `` C:\Users\YOURUSER\AppData\Local\pnpm\global\5\node_modules\openclaw\node_modules\@mariozechner\pi-ai\dist\providers\google-gemini-cli.js

macOS/Linux (npm): ``bash ~/.npm-global/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.js

macOS/Linux (source build): ``bash ~/moltbot-ref/node_modules/.pnpm/@mariozechner+pi-ai@0.45.3_*/node_modules/@mariozechner/pi-ai/dist/providers/google-gemini-cli.js

### Step 2: Edit the User-Agent Open the file and find this line (around line 26):

javascript
"User-Agent": "antigravity/1.11.5 darwin/arm64",

Change it to:

javascript
"User-Agent": "antigravity/1.15.8 darwin/arm64",

### Step 3: Restart the Gateway

bash
openclaw gateway restart# orclawdbot gateway restart

That'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:

bash
clawdbot configure

Select 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-pro - google-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`:

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: 1. Create a project at https://console.cloud.google.com/ 2. Enable Gmail API 3. Create OAuth 2.0 credentials (Desktop app type) 4. Add http://127.0.0.1:5316 as authorized redirect URI 5. Download client ID and secret

Then authenticate:

bash
clawdbot gmail login

## Fix 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 (from claude setup-token) - ❌ Don't use sk-ant-sid02-... tokens (browser session cookies - they're short-lived and fragile)

To get the correct token:

bash
claude setup-token

This 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:

json5
{  "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:

bash
clawdbot configure# Select Google Antigravity# Log in with your second Google account# It will be added to the profile list

## Rate Limit Cooldowns Antigravity has aggressive rate limits. If you keep hitting cooldowns: 1. Add more accounts for failover (see above) 2. Reduce request frequency - space out your requests 3. Use a fallback model - configure a backup like OpenRouter: ``json5 { agents: { defaults: { model: { primary: "google-antigravity/gemini-2.0-flash-exp", fallbacks: ["openrouter/google/gemini-2.0-flash-exp:free"] } } } }

## Full Troubleshooting Checklist

bash
# 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.$97/mo (going to $197 soon)

Join Vibe Combinator →

📋 Quick Commands

CommandDescription
openclaw gateway restartRestart the gateway after patching the User-Agent
clawdbot configureRe-run configuration wizard to refresh OAuth tokens
clawdbot gmail loginStart Gmail OAuth authentication flow
claude setup-tokenGenerate a proper OAuth token (not browser session)
openclaw models status --probeTest connection to configured model providers
openclaw status --allShow full diagnostic status including auth
openclaw logs --followWatch gateway logs in real-time for auth errors

Related Issues

    🐙 Your AI should run your business.

    Weekly live builds + template vault. We'll show you how to make AI actually work.$97/mo (going to $197 soon)

    Join Vibe Combinator →

    Still stuck?

    Join our Discord community for real-time help.

    Join Discord