
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
opencode-google-antigravity-auth
Advanced tools
Opencode plugin providing Antigravity OAuth for Gemini models
Authenticate the Opencode CLI with your Antigravity (Cloud Code) account so you can use the Antigravity-backed Gemini models with your existing quota.
Add the plugin to your Opencode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-google-antigravity-auth"]
}
Run opencode auth login.
Choose the Google provider and select OAuth with Google (Antigravity).
Authenticate with your first Google account in the browser.
Optional: Add more accounts for load balancing when prompted.
The plugin spins up a local callback listener on http://localhost:36742/oauth-callback, so after approving in the browser you'll land on an "Authentication complete" page with no URL copy/paste required. If that port is already taken or you're headless, the CLI automatically falls back to the copy/paste flow and explains what to do.
The plugin supports automatic rotation across multiple Google accounts to work around rate limits.
During opencode auth login, you'll be prompted to add additional accounts:
✓ Account 1 authenticated (user@gmail.com)
You have 1 account(s) configured. Add another? (y/n): y
You can add up to 10 accounts. The plugin stores account metadata in $XDG_DATA_HOME/opencode/antigravity-accounts.json (for example ~/.local/share/opencode/antigravity-accounts.json).
The plugin logs account switches:
[INFO] Using account 1/3 (user@gmail.com)
[INFO] Account 1/3 rate-limited, switching...
[INFO] Using account 2/3 (user2@gmail.com)
Toast notifications also appear when switching accounts.
The plugin exposes a google_search tool that allows models to fetch real-time information from the web using Google Search and URL context analysis.
Due to Gemini API limitations, native search tools (googleSearch, urlContext) cannot be combined with function declarations (custom tools like bash, read, write) in the same request. The plugin solves this by implementing google_search as a wrapper tool that makes separate API calls to Gemini with only native search tools enabled.
Agent (with custom tools: bash, read, write, etc.)
│
└── Calls google_search tool
│
└── Makes SEPARATE API call to Gemini with:
- Model: gemini-2.5-flash
- Tools: [{ googleSearch: {} }, { urlContext: {} }]
- Returns formatted markdown with sources
The tool is automatically available to models that support tool use. Simply ask questions that require current information:
"What are the latest news about AI?"
"Summarize this article: https://example.com/article"
"What's the current stock price of AAPL?"
When you provide URLs in your query, the model will automatically extract and analyze them.
All models can use the google_search tool since it makes independent API calls:
[!WARNING] Opencode does NOT auto-update plugins.
To get the latest version, clear the cached plugin and let Opencode reinstall it:
rm -rf ~/.cache/opencode/node_modules/opencode-google-antigravity-auth
opencode
Alternatively, remove the dependency from ~/.cache/opencode/package.json if the above doesn't work.
Antigravity forwards Gemini model options, including thinkingConfig:
thinkingLevel for Gemini 3 models ("low" | "medium" | "high").thinkingBudget for Gemini 2.5 models (number).{
"provider": {
"google": {
"models": {
"gemini-3-pro-preview": {
"variants": {
"high": {
"options": {
"thinkingConfig": {
"thinkingLevel": "high",
"includeThoughts": true
}
}
}
}
},
"gemini-3-flash": {
"variants": {
"medium": {
"options": {
"thinkingConfig": {
"thinkingLevel": "medium",
"includeThoughts": true
}
}
}
}
},
"gemini-claude-sonnet-4-5-thinking": {
"variants": {
"high": {
"options": {
"thinkingConfig": {
"thinkingBudget": 32000,
"includeThoughts": true
}
}
}
}
}
}
}
}
}
Antigravity provides access to Claude models via gemini-claude-* model names. The plugin automatically transforms tool schemas for Claude compatibility.
gemini-claude-sonnet-4-5 - Claude Sonnet 4.5gemini-claude-sonnet-4-5-thinking - Claude Sonnet 4.5 with thinkinggemini-claude-opus-4-5-thinking - Claude Opus 4.5 with thinkingWhen you use any Claude thinking model (models with -thinking suffix), the plugin automatically enables interleaved thinking by adding the anthropic-beta: interleaved-thinking-2025-05-14 header to your requests.
What is Interleaved Thinking?
Without interleaved thinking, Claude thinks once at the beginning and then executes all tool calls. With interleaved thinking enabled, Claude can think between tool calls, allowing it to:
Why This Matters for Coding Agents
AI coding tools like Opencode heavily rely on tool use (reading files, searching code, running commands). Interleaved thinking significantly improves the quality of multi-step coding tasks because Claude can:
Automatic Enablement
You don't need to configure anything - when you use any -thinking Claude model variant, the plugin automatically:
anthropic-beta: interleaved-thinking-2025-05-14 headerThis is enabled by default because if you're opting into extended thinking, you almost certainly want the improved reasoning that interleaved thinking provides for tool-heavy workflows.
git clone https://github.com/shekohex/opencode-google-antigravity-auth.git
cd opencode-google-antigravity-auth
bun install
To load a local checkout in Opencode:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/opencode-google-antigravity-auth"]
}
You should copy that config to your opencode config file.
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-google-antigravity-auth"],
"provider": {
"google": {
"npm": "@ai-sdk/google",
"models": {
"gemini-3-pro-preview": {
"id": "gemini-3-pro-preview",
"name": "Gemini 3 Pro",
"release_date": "2025-11-18",
"reasoning": true,
"limit": { "context": 1000000, "output": 64000 },
"cost": { "input": 2, "output": 12, "cache_read": 0.2 },
"modalities": {
"input": ["text", "image", "video", "audio", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
}
},
"gemini-3-flash": {
"id": "gemini-3-flash",
"name": "Gemini 3 Flash",
"release_date": "2025-12-17",
"reasoning": true,
"limit": { "context": 1048576, "output": 65536 },
"cost": { "input": 0.5, "output": 3, "cache_read": 0.05 },
"modalities": {
"input": ["text", "image", "video", "audio", "pdf"],
"output": ["text"]
},
"variants": {
"minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
"low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
"medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
"high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
}
},
"gemini-2.5-flash-lite": {
"id": "gemini-2.5-flash-lite",
"name": "Gemini 2.5 Flash Lite",
"reasoning": false
},
"gemini-claude-sonnet-4-5-thinking": {
"id": "gemini-claude-sonnet-4-5-thinking",
"name": "Claude Sonnet 4.5",
"reasoning": true,
"limit": { "context": 200000, "output": 64000 },
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"none": { "reasoning": false, "options": { "thinkingConfig": { "includeThoughts": false } } },
"low": { "options": { "thinkingConfig": { "thinkingBudget": 4000, "includeThoughts": true } } },
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16000, "includeThoughts": true } } },
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32000, "includeThoughts": true } } }
}
},
"gemini-claude-opus-4-5-thinking": {
"id": "gemini-claude-opus-4-5-thinking",
"name": "Claude Opus 4.5",
"release_date": "2025-11-24",
"reasoning": true,
"limit": { "context": 200000, "output": 64000 },
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "options": { "thinkingConfig": { "thinkingBudget": 4000, "includeThoughts": true } } },
"medium": { "options": { "thinkingConfig": { "thinkingBudget": 16000, "includeThoughts": true } } },
"high": { "options": { "thinkingConfig": { "thinkingBudget": 32000, "includeThoughts": true } } }
}
}
}
}
}
}
Use OpenCode's built-in logging to debug Antigravity requests:
opencode --log-level DEBUG --print-logs
Or just set the log level and check the log files:
opencode --log-level DEBUG
Log files are stored in ~/.local/share/opencode/logs/ (or $XDG_DATA_HOME/opencode/logs/).
opencode auth login and pick Antigravity.opencode run -m google/gemini-2.5-flash -p "hello" or opencode run -m google/gemini-3-pro-high -p "solve this".To enable image input for Antigravity models in OpenCode, you must add the modalities configuration to your model definitions in opencode.json:
{
"provider": {
"google": {
"models": {
"gemini-3-pro-preview": {
"modalities": {
"input": ["text", "image"],
"output": ["text"]
}
},
"gemini-claude-sonnet-4-5-thinking": {
"modalities": {
"input": ["text", "image"],
"output": ["text"]
}
}
}
}
}
}
Without the modalities.input array containing "image", OpenCode will reject image inputs with the error: "this model does not support image input". This applies to both Gemini and Claude models accessed through Antigravity.
Note: The example config in this README already includes proper modalities configuration for all models.
Gemini API requires tool names to match the pattern ^[a-zA-Z_][a-zA-Z0-9_-]*$, meaning they cannot start with numbers. The plugin automatically sanitizes tool names by prepending t_ to any tool name that starts with a digit.
For example:
21st-dev-magic_component_builder → t_21st-dev-magic_component_builderThis sanitization is transparent and automatic. However, if you encounter tool-related errors with Gemini models, you can disable problematic MCP servers in your config:
{
"provider": {
"google": {
"models": {
"gemini-3-pro-preview": {
"tools": {
"21st-dev-magic_*": false
}
}
}
}
}
}
opencode-skillsThe opencode-skills plugin is currently incompatible with this plugin. Using them together may cause invalid_request_error failures, especially with Claude thinking models, due to conflicts in message history handling.
Recommended Alternative: We suggest using openskills instead, which provides similar functionality without these compatibility issues.
This project is based on:
You can switch between Claude and Gemini models within the same conversation session. The plugin handles the complexities of thinking block signatures with family-independent caching.
When models generate "thinking" blocks (extended reasoning), each provider signs them cryptographically. These signatures are provider-specific and cannot be validated across providers. The plugin solves this with:
claude or gemini), preventing cross-contamination| Transition | Thinking Preserved | Notes |
|---|---|---|
| Claude → Claude | ✅ All Claude thinking | Signatures restored from Claude cache |
| Gemini → Gemini | ✅ All Gemini thinking | Signatures restored from Gemini cache |
| Claude → Gemini | ❌ Claude thinking removed | Not in Gemini's cache |
| Gemini → Claude | ❌ Gemini thinking removed | Not in Claude's cache |
Turn 1: Claude (thinking) → "Let me analyze this..." [cached in Claude family]
Turn 2: Switch to Gemini → Claude's thinking removed, only text preserved
Turn 3: Gemini (thinking) → "Processing..." [cached in Gemini family]
Turn 4: Switch to Claude → Gemini's thinking removed, Claude Turn 1 restored ✅
Turn 5: Switch to Gemini → Claude's thinking removed, Gemini Turn 3 restored ✅
FAQs
Opencode plugin providing Antigravity OAuth for Gemini models
The npm package opencode-google-antigravity-auth receives a total of 309 weekly downloads. As such, opencode-google-antigravity-auth popularity was classified as not popular.
We found that opencode-google-antigravity-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.