Opencode Antigravity OAuth Auth Plugin
raw JSON → 1.9.7 verified Sat Apr 25 auth: no javascript
Opencode plugin (v1.9.7) enabling OAuth authentication against Google's Antigravity (IDE) and Gemini CLI quotas for access to models like gemini-3.1-pro and gemini-3-flash. Supports multi-account auto-rotation, dual quota systems, Google Search grounding, and extended thinking for Gemini models. Includes automatic session recovery and tool failure handling. Violates Google ToS — accounts may be banned. Requires Node >=20 and TypeScript ^5 as peer dependency. Ships TypeScript types.
Common errors
error opencode: error: unknown model 'google/antigravity-claude-opus-4-6-thinking' ↓
cause Claude models removed after v1.5.0.
fix
Use Gemini models: antigravity-gemini-3-pro or antigravity-gemini-3-flash.
error Error: OAuth token expired ↓
cause Google OAuth token has expired or was revoked.
fix
Run 'opencode auth login' again to re-authenticate.
error Error: 429 Too Many Requests ↓
cause Rate limit exceeded for current quota pool.
fix
Add additional Google accounts for multi-account auto-rotation, or switch to a different quota pool (Antigravity vs Gemini CLI).
error Error: Plugin 'opencode-antigravity-auth-tweaked' not found ↓
cause Plugin not installed correctly in opencode.json.
fix
Ensure opencode.json contains: { "plugin": ["opencode-antigravity-auth-tweaked@latest"] } and restart Opencode.
Warnings
gotcha Using this plugin violates Google's Terms of Service and may result in account suspension or shadow-ban. ↓
fix Do not use if you rely on your Google account for critical services.
gotcha Plugin compatibility with other Opencode plugins (e.g., oh-my-opencode, dcp) is not guaranteed. Third-party modifications may break functionality. ↓
fix Report issues to the plugin author, but expect limited support.
deprecated Claude model support (opus-4-6, sonnet-4-6) has been removed as of v1.5.0. ↓
fix Use Gemini models instead (e.g., antigravity-gemini-3-pro).
breaking Model IDs changed in v1.0.0: 'claude-opus-4-6' renamed to 'antigravity-claude-opus-4-6-thinking' (later removed). ↓
fix Update model names to current list (see README).
Install
npm install opencode-antigravity-auth-tweaked yarn add opencode-antigravity-auth-tweaked pnpm add opencode-antigravity-auth-tweaked Imports
- plugin wrong
npm install opencode-antigravity-auth-tweakedcorrectadd plugin to opencode.json: { "plugin": ["opencode-antigravity-auth-tweaked@latest"] } - default
No programmatic import — configure via opencode.json - types
TypeScript types are shipped but not directly importable by users
Quickstart
// Step 1: Add to ~/.config/opencode/opencode.json
{
"plugin": ["opencode-antigravity-auth-tweaked@latest"]
}
// Step 2: Authenticate
$ opencode auth login
// Step 3: Follow prompts to configure models
// Step 4: Test
$ opencode run "Hello" --model=google/antigravity-gemini-3-pro --variant=high