cd /news/developer-tools/opencode-opencode-antigravity-auth-s… · home topics developer-tools article
[ARTICLE · art-57456] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

OpenCode + opencode-antigravity-auth setup (Pro/Opus primary, Flash/Sonnet budget subagents; no effort pins)

A developer shared a portable setup for OpenCode using the opencode-antigravity-auth plugin, which enables Google OAuth-based access to Antigravity quota for Gemini and Claude models. The configuration assigns primary models (Gemini 3.1 Pro and Claude Opus 4-6 Thinking) for coding and planning, with budget subagents (Gemini 3.5 Flash and Claude Sonnet 4-6) for lighter tasks, and includes installation instructions via a public gist.

read4 min views1 publishedJul 13, 2026

Portable setup for OpenCode with ** opencode-antigravity-auth** (Google OAuth → Antigravity quota for Gemini + Claude).

Notthe Antigravity IDE. This is OpenCode’s Google/Gemini auth path only.

Gist: https://gist.github.com/saadev0/0e3f43d24c3f05903f9c4bd732e961d0

Role Model id Notes
Primary (default / build )
google/antigravity-gemini-3.1-pro
Main coding
Primary (plan )
google/antigravity-claude-opus-4-6-thinking
Planning / deep work
Budget subagent (explore , titles, summary, compaction, small_model )
google/antigravity-gemini-3.5-flash
Search / light utility
Budget subagent (general )
google/antigravity-claude-sonnet-4-6
Tool-call / general subagent

Effort/variants are not pinned. Variants (low

/ high

/ max

/ …) stay available so you or the agent can choose per task. Subagents use budget model families, not primary Pro/Opus.

File Install path
opencode.jsonc
~/.config/opencode/opencode.jsonc
antigravity.json
~/.config/opencode/antigravity.json
package.json
~/.config/opencode/package.json (optional deps pin)
README.md
this doc

Do not copy OAuth secrets or antigravity-accounts.json

into a public gist.


mkdir -p ~/.config/opencode
cd ~/.config/opencode

BASE="https://gist.githubusercontent.com/saadev0/0e3f43d24c3f05903f9c4bd732e961d0/raw"
curl -fsSL "$BASE/opencode.jsonc" -o opencode.jsonc
curl -fsSL "$BASE/antigravity.json" -o antigravity.json
curl -fsSL "$BASE/package.json" -o package.json

npm install

opencode auth login

opencode models | grep antigravity

opencode run "Hello" --model=google/antigravity-gemini-3.1-pro
opencode run "Hello" --model=google/antigravity-claude-opus-4-6-thinking
opencode run "Hello" --model=google/antigravity-gemini-3.5-flash
BASE="https://gist.githubusercontent.com/saadev0/0e3f43d24c3f05903f9c4bd732e961d0/raw"
mkdir -p ~/.config/opencode && cd ~/.config/opencode
curl -fsSL "$BASE/opencode.jsonc" -o opencode.jsonc
curl -fsSL "$BASE/antigravity.json" -o antigravity.json
curl -fsSL "$BASE/package.json" -o package.json
npm install
  • Loads plugin: opencode-antigravity-auth@latest

  • Whitelists only the four Antigravity models above

  • Declares model limits, modalities, and optional variants (not forced) - Agent model family map:- primary → Pro / Opus

  • subagent / utility → Flash / Sonnet

  • No variant: "high"

/variant: "low"

on agents

Key Value Why
account_selection_strategy
hybrid
Good multi-account default
auto_update
false
Avoid silent plugin overwrites of local patches
debug
true
Logs under ~/.config/opencode/antigravity-logs/
quota_fallback
false
No silent Gemini CLI / alternate routing
cli_first
false
Prefer Antigravity quota first

Optional later:

{
  "pid_offset_enabled": true   // parallel subagents across accounts
}
  • Credentials: ~/.config/opencode/antigravity-accounts.json

(local only, never gist) - Add accounts: opencode auth login

again - Reset auth: delete antigravity-accounts.json

, re-login - ToS risk: unofficial Google OAuth path — use an established account; see upstream README

Upstream plugin: opencode-antigravity-auth

opencode.jsonc

alone is enough for model registration (whitelist + agent map).

These optional patches live under:

~/.config/opencode/node_modules/opencode-antigravity-auth/

They are wiped on npm reinstall/update (hence auto_update: false

).

Change Purpose
Register antigravity-gemini-3.5-flash in plugin models.js
Official plugin list may lag 3.5 Flash
Aliases gemini-3.5-flash-{minimal,low,medium,high} in model-resolver.js
Tier suffixes resolve cleanly
SEARCH_MODEL = "gemini-3.5-flash" in constants.js
Search tool uses budget Flash
No silent default -low / -high on bare models
Effort only when you pick a variant
Opus variant high (= max budget 32768)
Friendly label alongside max

After npm install

, re-apply patches if you rely on them, or keep a local fork.

opencode run "..." --model=google/antigravity-gemini-3.1-pro --variant=high
opencode run "..." --model=google/antigravity-claude-opus-4-6-thinking --variant=high
opencode run "..." --model=google/antigravity-gemini-3.5-flash --variant=medium

Without --variant

, the plugin does not invent low/high for you.

Symptom Fix
Model missing from list Ensure opencode.jsonc whitelist + models block; restart OpenCode
403 / project denied Set projectId on each account in antigravity-accounts.json ; enable Cloud Code Assist API
OAuth callback fails (Safari) Use Chrome/Firefox or disable Safari HTTPS-Only for localhost
Rate limited Add more Google accounts; wait; check quotas via auth menu
Plugin update wiped 3.5 Flash Re-install configs from this gist; re-apply local patches; keep auto_update: false

Source of truth for a new machine: this gistLive machine config:~/.config/opencode/opencode.jsonc

+antigravity.json

  • After changing live config, push updates back into this gist (same files)

Maintained for saadev0 · OpenCode Google auth via Antigravity OAuth

── more in #developer-tools 4 stories · sorted by recency
── more on @opencode 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/opencode-opencode-an…] indexed:0 read:4min 2026-07-13 ·