š§µ TL;DR (Too Long; Didnāt Read)
Want to use powerful AI models like Claude Opus 4.5 and Gemini 3 for free? This guide walks you through setting up OpenCode with the Antigravity plugin and Google OAuth. Youāll be up and running with top-tier models in minutesāno paid API keys required.
š Getting Started with OpenCode + Antigravity Auth
OpenCode is an open-source AI coding agent that lets you connect to models like Claude, GPT, Gemini, and more. It comes with free models out of the box, or you can bring your own from any provider.
In this guide, Iāll walk you through setting up OpenCode with Antigravity Auth using Google OAuth.
š Step 1: Install OpenCode
You can install OpenCode using various package managers like Homebrew, npm, pnpm, yarn, scoop, choco, etc.
For this guide, Iāll use bun:
bun install -g opencode-ai
More install options: Installation Docs
āļø Step 2: Configure the Plugin
Weāll use opencode-antigravity-auth plugin. Follow the installation instructions in the repo. Iāll go with Option B here:
vim ~/.config/opencode/opencode.json
Add the plugin:
{
"plugin": ["opencode-antigravity-auth@beta"]
}
š Step 3: Authenticate with Google (Antigravity)
Make sure you have a Google account that supports Antigravity.
Run:
opencode auth login
Youāll see a provider list like this:
> Google
OpenAI
Anthropic
GitHub Copilot
...
Select Google, then choose:
> OAuth with Google (Antigravity)
Your browser will openāsign in with your Google account. Once complete, you should see:
⢠Multi-account setup complete (1 account(s)).
o Login successful
ā Done
š§© Step 4: Update Your Config
Now letās update the full config file to include model definitions. Open:
vim ~/.config/opencode/opencode.json
And paste the full configuration block from the pluginās documentation. (You can keep the version you shared aboveāno changes needed unless you want to customize models.)
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-antigravity-auth@latest"],
"provider": {
"google": {
"models": {
"antigravity-gemini-3-pro": {
"name": "Gemini 3 Pro (Antigravity)",
"limit": { "context": 1048576, "output": 65535 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingLevel": "low" },
"high": { "thinkingLevel": "high" }
}
},
"antigravity-gemini-3-flash": {
"name": "Gemini 3 Flash (Antigravity)",
"limit": { "context": 1048576, "output": 65536 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"minimal": { "thinkingLevel": "minimal" },
"low": { "thinkingLevel": "low" },
"medium": { "thinkingLevel": "medium" },
"high": { "thinkingLevel": "high" }
}
},
"antigravity-claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5 (Antigravity)",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"antigravity-claude-sonnet-4-5-thinking": {
"name": "Claude Sonnet 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-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 } }
}
},
"gemini-2.5-flash": {
"name": "Gemini 2.5 Flash (Gemini CLI)",
"limit": { "context": 1048576, "output": 65536 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"gemini-2.5-pro": {
"name": "Gemini 2.5 Pro (Gemini CLI)",
"limit": { "context": 1048576, "output": 65536 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"gemini-3-flash-preview": {
"name": "Gemini 3 Flash Preview (Gemini CLI)",
"limit": { "context": 1048576, "output": 65536 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"gemini-3-pro-preview": {
"name": "Gemini 3 Pro Preview (Gemini CLI)",
"limit": { "context": 1048576, "output": 65535 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
}
}
}
}
}
š§ Step 5: Select Claude Opus 4.5
Launch OpenCode:
opencode
Then press Ctrl + P and choose:
Switch model ā Claude Opus 4.5 (Antigravity)
Thatās it! Youāre now ready to use OpenCode with Antigravity-authenticated models. Happy coding! š±

Top comments (2)
Building on opencode-antigravity-auth, there are now two companion plugins that extend its capabilities:
opencode-antigravity-web (npmjs.com/package/opencode-antigra...) - Web search and URL reading
opencode-antigravity-img (npmjs.com/package/opencode-antigra...) - Image generation
Setup is simple - just add them alongside the auth plugin:
{
plugins: [
opencode-antigravity-auth,
opencode-antigravity-web,
opencode-antigravity-img
]
}
All three work together using the same Google OAuth authentication.
Can one use these settings for cursor.