Google Antigravity IDE OAuth auth plugin for Opencode - access Gemini 3 Pro and Claude 4.5 using Google credentials
npm install vibe-open-auth
OpenCode plugin for Google Antigravity and Kiro (AWS CodeWhisperer) APIs. Access Claude and Gemini models using Google or AWS credentials.
> Fork of opencode-antigravity-auth with Kiro support and additional fixes.
- Thinking Recovery Fix - Uses SKIP_THOUGHT_SIGNATURE sentinel to bypass signature validation on cache miss, reducing "corrupted context" errors
- Capacity Exhausted Switching - Auto-switches account on server capacity errors instead of waiting
- Configurable Rate Limits - New default_retry_after_seconds and max_backoff_seconds options
- Image Quota Fix - Correct wait time calculation for image generation models
If you're using oh-my-opencode, you must choose ONE of these plugins:
- vibe-open-auth (this plugin - includes Kiro support)
- opencode-antigravity-auth (upstream)
Both plugins register the same google provider. Using both will cause conflicts.
To use vibe-open-auth with oh-my-opencode:
1. Edit ~/.config/opencode/opencode.json
2. Remove opencode-antigravity-auth from the plugin array
3. Add github:frankekn/vibe-open-auth instead
- Google Antigravity - Access Claude and Gemini via Google OAuth
- Kiro (AWS) - Access Claude Opus/Sonnet via AWS Builder ID
- Dual Quota System - Antigravity + Gemini CLI quota
- Multi-Account Rotation - auto-switches on rate limit
- Session Recovery - auto-recover from tool_result_missing errors
Add to ~/.config/opencode/opencode.json:
``json`
{
"plugin": ["vibe-open-auth"],
"provider": {
"google": {
"models": {
"kiro-claude-opus-4-5": {
"name": "Claude Opus 4.5 (Kiro)",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image"], "output": ["text"] }
},
"kiro-claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5 (Kiro)",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image"], "output": ["text"] }
},
"antigravity-claude-opus-4-5-thinking": {
"name": "Claude Opus 4.5 Thinking (Antigravity)",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"antigravity-gemini-3-flash": {
"name": "Gemini 3 Flash (Antigravity)",
"limit": { "context": 1048576, "output": 65536 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingLevel": "low" },
"high": { "thinkingLevel": "high" }
}
}
}
}
}
}
Alternative install methods:
`json
// Pin to specific version
"plugin": ["vibe-open-auth@1.0.18"]
// Or install from GitHub
"plugin": ["github:frankekn/vibe-open-auth"]
`
> Note: Do NOT use @latest suffix (e.g., vibe-open-auth@latest) - there's a known OpenCode bug with this syntax.
General users should keep the plugin entry unpinned:
`json`
{ "plugin": ["vibe-open-auth"] }
On startup, the built-in auto-update checker queries npm:
- If a newer version exists, it invalidates the cached package and shows a toast asking for restart.
- If the entry is pinned (e.g., vibe-open-auth@1.0.18) and auto_update is enabled, it updates the version in your config automatically.
Local path installs do not auto-update; switch to the npm entry above for updates.
`bashKiro (requires Kiro IDE login first)
opencode run "Hello" --model=google/kiro-claude-opus-4-5
Available Models
$3
Requires: Login to Kiro IDE first (uses
~/.aws/sso/cache/kiro-auth-token.json)All Kiro models have extended thinking enabled by default.
| Model | Description |
|-------|-------------|
|
kiro-claude-opus-4-5 | Claude Opus 4.5 with extended thinking |
| kiro-claude-sonnet-4-5 | Claude Sonnet 4.5 with extended thinking |$3
Requires:
opencode auth login with Google account| Model | Variants |
|-------|----------|
|
antigravity-gemini-3-pro | low, high |
| antigravity-gemini-3-flash | minimal, low, medium, high |
| antigravity-claude-sonnet-4-5 | - |
| antigravity-claude-sonnet-4-5-thinking | low, max |
| antigravity-claude-opus-4-5-thinking | low, max |$3
| Model |
|-------|
|
gemini-2.5-flash |
| gemini-2.5-pro |
| gemini-3-flash-preview |
| gemini-3-pro-preview |Configuration
Create
~/.config/opencode/antigravity.json:`json
{
"quiet_mode": false,
"debug": false,
"session_recovery": true,
"auto_resume": true,
"quota_fallback": true,
"account_selection_strategy": "hybrid",
"switch_on_first_rate_limit": true,
"default_retry_after_seconds": 60,
"max_backoff_seconds": 60,
"quota_protection": {
"enabled": true,
"threshold_percentage": 10,
"refresh_interval_seconds": 300,
"monitored_models": [
"claude-sonnet-4-5",
"gemini-3-pro-high",
"gemini-3-flash",
"gemini-3-pro-image"
],
"prefer_high_quota": true
}
}
`Debug mode:
`bash
OPENCODE_ANTIGRAVITY_DEBUG=1 opencode
`Multi-Account
Add multiple Google accounts for higher quota:
`bash
opencode auth login
``Accounts auto-rotate when rate limited.
- opencode-antigravity-auth - Original plugin by @NoeFabris
- opencode-gemini-auth - Gemini OAuth groundwork by @jenslys
MIT