{"id":42613334,"url":"https://github.com/NoeFabris/opencode-antigravity-auth","last_synced_at":"2026-02-01T09:00:46.800Z","repository":{"id":328172354,"uuid":"1113403973","full_name":"NoeFabris/opencode-antigravity-auth","owner":"NoeFabris","description":"Enable Opencode to authenticate against Antigravity (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like gemini-3-pro and claude-opus-4-5-thinking with your Google credentials.","archived":false,"fork":false,"pushed_at":"2026-01-30T17:18:56.000Z","size":1125,"stargazers_count":7022,"open_issues_count":18,"forks_count":486,"subscribers_count":23,"default_branch":"main","last_synced_at":"2026-01-31T01:55:56.626Z","etag":null,"topics":["claude","gemini","google","opencode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoeFabris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.MD","dco":null,"cla":null},"funding":{"github":"NoeFabris","patreon":null,"open_collective":null,"ko_fi":"noefabris","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-12-09T23:46:18.000Z","updated_at":"2026-01-31T01:37:09.000Z","dependencies_parsed_at":"2026-01-16T19:01:00.340Z","dependency_job_id":null,"html_url":"https://github.com/NoeFabris/opencode-antigravity-auth","commit_stats":null,"previous_names":["noefabris/opencode-antigravity-auth"],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/NoeFabris/opencode-antigravity-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoeFabris%2Fopencode-antigravity-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoeFabris%2Fopencode-antigravity-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoeFabris%2Fopencode-antigravity-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoeFabris%2Fopencode-antigravity-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoeFabris","download_url":"https://codeload.github.com/NoeFabris/opencode-antigravity-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoeFabris%2Fopencode-antigravity-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","gemini","google","opencode"],"created_at":"2026-01-29T03:05:59.306Z","updated_at":"2026-02-01T09:00:46.791Z","avatar_url":"https://github.com/NoeFabris.png","language":"TypeScript","readme":"# Antigravity + Gemini CLI OAuth Plugin for Opencode\n\n[![npm version](https://img.shields.io/npm/v/opencode-antigravity-auth.svg)](https://www.npmjs.com/package/opencode-antigravity-auth)\n[![npm beta](https://img.shields.io/npm/v/opencode-antigravity-auth/beta.svg?label=beta)](https://www.npmjs.com/package/opencode-antigravity-auth)\n[![npm downloads](https://img.shields.io/npm/dw/opencode-antigravity-auth.svg)](https://www.npmjs.com/package/opencode-antigravity-auth)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![X (Twitter)](https://img.shields.io/badge/X-@dopesalmon-000000?style=flat\u0026logo=x)](https://x.com/dopesalmon)\n\nEnable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like `gemini-3-pro` and `claude-opus-4-5-thinking` with your Google credentials.\n\n## What You Get\n\n- **Claude Opus 4.5, Sonnet 4.5** and **Gemini 3 Pro/Flash** via Google OAuth\n- **Multi-account support** — add multiple Google accounts, auto-rotates when rate-limited\n- **Dual quota system** — access both Antigravity and Gemini CLI quotas from one plugin\n- **Thinking models** — extended thinking for Claude and Gemini 3 with configurable budgets\n- **Google Search grounding** — enable web search for Gemini models (auto or always-on)\n- **Auto-recovery** — handles session errors and tool failures automatically\n- **Plugin compatible** — works alongside other OpenCode plugins (oh-my-opencode, dcp, etc.)\n\n---\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003e⚠️ Terms of Service Warning — Read Before Installing\u003c/b\u003e\u003c/summary\u003e\n\n\u003e [!CAUTION]\n\u003e Using this plugin may violate Google's Terms of Service. A small number of users have reported their Google accounts being **banned** or **shadow-banned** (restricted access without explicit notification).\n\u003e\n\u003e **High-risk scenarios:**\n\u003e - 🚨 **Fresh Google accounts** have a very high chance of getting banned\n\u003e - 🚨 **New accounts with Pro/Ultra subscriptions** are frequently flagged and banned\n\u003e\n\u003e **By using this plugin, you acknowledge:**\n\u003e - This is an unofficial tool not endorsed by Google\n\u003e - Your account may be suspended or permanently banned\n\u003e - You assume all risks associated with using this plugin\n\u003e\n\u003e **Recommendation:** Use an established Google account that you don't rely on for critical services. Avoid creating new accounts specifically for this plugin.\n\n\u003c/details\u003e\n\n---\n\n## Installation\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eFor Humans\u003c/b\u003e\u003c/summary\u003e\n\n**Option A: Let an LLM do it**\n\nPaste this into any LLM agent (Claude Code, OpenCode, Cursor, etc.):\n\n```\nInstall the opencode-antigravity-auth plugin and add the Antigravity model definitions to ~/.config/opencode/opencode.json by following: https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/dev/README.md\n```\n\n**Option B: Manual setup**\n\n1. **Add the plugin** to `~/.config/opencode/opencode.json`:\n\n   ```json\n   {\n     \"plugin\": [\"opencode-antigravity-auth@latest\"]\n   }\n   ```\n\n   \u003e Want bleeding-edge features? Use `opencode-antigravity-auth@beta` instead.\n\n2. **Login** with your Google account:\n\n   ```bash\n   opencode auth login\n   ```\n\n3. **Add models** — copy the [full configuration](#models) below\n\n4. **Use it:**\n\n   ```bash\n   opencode run \"Hello\" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max\n   ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFor LLM Agents\u003c/b\u003e\u003c/summary\u003e\n\n### Step-by-Step Instructions\n\n1. Edit the OpenCode configuration file at `~/.config/opencode/opencode.json`\n   \n   \u003e **Note**: This path works on all platforms. On Windows, `~` resolves to your user home directory (e.g., `C:\\Users\\YourName`).\n\n2. Add the plugin to the `plugin` array\n\n3. Add the model definitions from the [Full models configuration](#models) section\n\n4. Set `provider` to `\"google\"` and choose a model\n\n### Verification\n\n```bash\nopencode run \"Hello\" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max\n```\n\n\u003c/details\u003e\n\n---\n\n## Models\n\n### Model Reference\n\n**Antigravity quota** (Claude + Gemini 3):\n\n| Model | Variants | Notes |\n|-------|----------|-------|\n| `antigravity-gemini-3-pro` | low, high | Gemini 3 Pro with thinking |\n| `antigravity-gemini-3-flash` | minimal, low, medium, high | Gemini 3 Flash with thinking |\n| `antigravity-claude-sonnet-4-5` | — | Claude Sonnet 4.5 |\n| `antigravity-claude-sonnet-4-5-thinking` | low, max | Claude Sonnet with extended thinking |\n| `antigravity-claude-opus-4-5-thinking` | low, max | Claude Opus with extended thinking |\n\n**Gemini CLI quota** (separate from Antigravity):\n\n| Model | Notes |\n|-------|-------|\n| `gemini-2.5-flash` | Gemini 2.5 Flash |\n| `gemini-2.5-pro` | Gemini 2.5 Pro |\n| `gemini-3-flash-preview` | Gemini 3 Flash (preview) |\n| `gemini-3-pro-preview` | Gemini 3 Pro (preview) |\n\n**Using variants:**\n```bash\nopencode run \"Hello\" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max\n```\n\nFor details on variant configuration and thinking levels, see [docs/MODEL-VARIANTS.md](docs/MODEL-VARIANTS.md).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFull models configuration (copy-paste ready)\u003c/b\u003e\u003c/summary\u003e\n\nAdd this to your `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"opencode-antigravity-auth@latest\"],\n  \"provider\": {\n    \"google\": {\n      \"models\": {\n        \"antigravity-gemini-3-pro\": {\n          \"name\": \"Gemini 3 Pro (Antigravity)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65535 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] },\n          \"variants\": {\n            \"low\": { \"thinkingLevel\": \"low\" },\n            \"high\": { \"thinkingLevel\": \"high\" }\n          }\n        },\n        \"antigravity-gemini-3-flash\": {\n          \"name\": \"Gemini 3 Flash (Antigravity)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65536 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] },\n          \"variants\": {\n            \"minimal\": { \"thinkingLevel\": \"minimal\" },\n            \"low\": { \"thinkingLevel\": \"low\" },\n            \"medium\": { \"thinkingLevel\": \"medium\" },\n            \"high\": { \"thinkingLevel\": \"high\" }\n          }\n        },\n        \"antigravity-claude-sonnet-4-5\": {\n          \"name\": \"Claude Sonnet 4.5 (Antigravity)\",\n          \"limit\": { \"context\": 200000, \"output\": 64000 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] }\n        },\n        \"antigravity-claude-sonnet-4-5-thinking\": {\n          \"name\": \"Claude Sonnet 4.5 Thinking (Antigravity)\",\n          \"limit\": { \"context\": 200000, \"output\": 64000 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] },\n          \"variants\": {\n            \"low\": { \"thinkingConfig\": { \"thinkingBudget\": 8192 } },\n            \"max\": { \"thinkingConfig\": { \"thinkingBudget\": 32768 } }\n          }\n        },\n        \"antigravity-claude-opus-4-5-thinking\": {\n          \"name\": \"Claude Opus 4.5 Thinking (Antigravity)\",\n          \"limit\": { \"context\": 200000, \"output\": 64000 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] },\n          \"variants\": {\n            \"low\": { \"thinkingConfig\": { \"thinkingBudget\": 8192 } },\n            \"max\": { \"thinkingConfig\": { \"thinkingBudget\": 32768 } }\n          }\n        },\n        \"gemini-2.5-flash\": {\n          \"name\": \"Gemini 2.5 Flash (Gemini CLI)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65536 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] }\n        },\n        \"gemini-2.5-pro\": {\n          \"name\": \"Gemini 2.5 Pro (Gemini CLI)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65536 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] }\n        },\n        \"gemini-3-flash-preview\": {\n          \"name\": \"Gemini 3 Flash Preview (Gemini CLI)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65536 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] }\n        },\n        \"gemini-3-pro-preview\": {\n          \"name\": \"Gemini 3 Pro Preview (Gemini CLI)\",\n          \"limit\": { \"context\": 1048576, \"output\": 65535 },\n          \"modalities\": { \"input\": [\"text\", \"image\", \"pdf\"], \"output\": [\"text\"] }\n        }\n      }\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\n---\n\n## Multi-Account Setup\n\nAdd multiple Google accounts for higher combined quotas. The plugin automatically rotates between accounts when one is rate-limited.\n\n```bash\nopencode auth login  # Run again to add more accounts\n```\n\n**Account management options (via `opencode auth login`):**\n- **Check quotas** — View remaining API quota for each account\n- **Manage accounts** — Enable/disable specific accounts for rotation\n\nFor details on load balancing, dual quota pools, and account storage, see [docs/MULTI-ACCOUNT.md](docs/MULTI-ACCOUNT.md).\n\n---\n\n## Troubleshoot\n\n\u003e **Quick Reset**: Most issues can be resolved by deleting `~/.config/opencode/antigravity-accounts.json` and running `opencode auth login` again.\n\n### Configuration Path (All Platforms)\n\nOpenCode uses `~/.config/opencode/` on **all platforms** including Windows.\n\n| File | Path |\n|------|------|\n| Main config | `~/.config/opencode/opencode.json` |\n| Accounts | `~/.config/opencode/antigravity-accounts.json` |\n| Plugin config | `~/.config/opencode/antigravity.json` |\n| Debug logs | `~/.config/opencode/antigravity-logs/` |\n\n\u003e **Windows users**: `~` resolves to your user home directory (e.g., `C:\\Users\\YourName`). Do NOT use `%APPDATA%`.\n\n---\n\n### Multi-Account Auth Issues\n\nIf you encounter authentication issues with multiple accounts:\n\n1. Delete the accounts file:\n   ```bash\n   rm ~/.config/opencode/antigravity-accounts.json\n   ```\n2. Re-authenticate:\n   ```bash\n   opencode auth login\n   ```\n\n---\n\n### 403 Permission Denied (`rising-fact-p41fc`)\n\n**Error:**\n```\nPermission 'cloudaicompanion.companions.generateChat' denied on resource \n'//cloudaicompanion.googleapis.com/projects/rising-fact-p41fc/locations/global'\n```\n\n**Cause:** Plugin falls back to a default project ID when no valid project is found. This works for Antigravity but fails for Gemini CLI models.\n\n**Solution:**\n1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Create or select a project\n3. Enable the **Gemini for Google Cloud API** (`cloudaicompanion.googleapis.com`)\n4. Add `projectId` to your accounts file:\n   ```json\n   {\n     \"accounts\": [\n       {\n         \"email\": \"your@email.com\",\n         \"refreshToken\": \"...\",\n         \"projectId\": \"your-project-id\"\n       }\n     ]\n   }\n   ```\n\n\u003e **Note**: Do this for each account in a multi-account setup.\n\n---\n\n### Gemini Model Not Found\n\nAdd this to your `google` provider config:\n\n```json\n{\n  \"provider\": {\n    \"google\": {\n      \"npm\": \"@ai-sdk/google\",\n      \"models\": { ... }\n    }\n  }\n}\n```\n\n---\n\n### Gemini 3 Models 400 Error (\"Unknown name 'parameters'\")\n\n**Error:**\n```\nInvalid JSON payload received. Unknown name \"parameters\" at 'request.tools[0]'\n```\n\n**Causes:**\n- Tool schema incompatibility with Gemini's strict protobuf validation\n- MCP servers with malformed schemas\n- Plugin version regression\n\n**Solutions:**\n1. **Update to latest beta:**\n   ```json\n   { \"plugin\": [\"opencode-antigravity-auth@beta\"] }\n   ```\n\n2. **Disable MCP servers** one-by-one to find the problematic one\n\n3. **Add npm override:**\n   ```json\n   { \"provider\": { \"google\": { \"npm\": \"@ai-sdk/google\" } } }\n   ```\n\n---\n\n### MCP Servers Causing Errors\n\nSome MCP servers have schemas incompatible with Antigravity's strict JSON format.\n\n**Common symptom:**\n```bash\nInvalid function name must start with a letter or underscore\n```\n\nSometimes it shows up as:\n```bash\nGenerateContentRequest.tools[0].function_declarations[12].name: Invalid function name must start with a letter or underscore\n```\n\nThis usually means an MCP tool name starts with a number (for example, a 1mcp key like `1mcp_*`). Rename the MCP key to start with a letter (e.g., `gw`) or disable that MCP entry for Antigravity models.\n\n**Diagnosis:**\n1. Disable all MCP servers in your config\n2. Enable one-by-one until error reappears\n3. Report the specific MCP in a [GitHub issue](https://github.com/NoeFabris/opencode-antigravity-auth/issues)\n\n---\n\n### \"All Accounts Rate-Limited\" (But Quota Available)\n\n**Cause:** Cascade bug in `clearExpiredRateLimits()` in hybrid mode (fixed in recent beta).\n\n**Solutions:**\n1. Update to latest beta version\n2. If persists, delete accounts file and re-authenticate\n3. Try switching `account_selection_strategy` to `\"sticky\"` in `antigravity.json`\n\n---\n\n### Session Recovery\n\nIf you encounter errors during a session:\n1. Type `continue` to trigger the recovery mechanism\n2. If blocked, use `/undo` to revert to pre-error state\n3. Retry the operation\n\n---\n\n### Using with Oh-My-OpenCode\n\n**Important:** Disable the built-in Google auth to prevent conflicts:\n\n```json\n// ~/.config/opencode/oh-my-opencode.json\n{\n  \"google_auth\": false,\n  \"agents\": {\n    \"frontend-ui-ux-engineer\": { \"model\": \"google/antigravity-gemini-3-pro\" },\n    \"document-writer\": { \"model\": \"google/antigravity-gemini-3-flash\" }\n  }\n}\n```\n\n---\n\n### Infinite `.tmp` Files Created\n\n**Cause:** When account is rate-limited and plugin retries infinitely, it creates many temp files.\n\n**Workaround:**\n1. Stop OpenCode\n2. Clean up: `rm ~/.config/opencode/*.tmp`\n3. Add more accounts or wait for rate limit to expire\n\n---\n\n### OAuth Callback Issues\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSafari OAuth Callback Fails (macOS)\u003c/b\u003e\u003c/summary\u003e\n\n**Symptoms:**\n- \"fail to authorize\" after successful Google login\n- Safari shows \"Safari can't open the page\"\n\n**Cause:** Safari's \"HTTPS-Only Mode\" blocks `http://localhost` callback.\n\n**Solutions:**\n\n1. **Use Chrome or Firefox** (easiest):\n   Copy the OAuth URL and paste into a different browser.\n\n2. **Disable HTTPS-Only Mode temporarily:**\n   - Safari \u003e Settings (⌘,) \u003e Privacy\n   - Uncheck \"Enable HTTPS-Only Mode\"\n   - Run `opencode auth login`\n   - Re-enable after authentication\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003ePort Conflict (Address Already in Use)\u003c/b\u003e\u003c/summary\u003e\n\n**macOS / Linux:**\n```bash\n# Find process using the port\nlsof -i :51121\n\n# Kill if stale\nkill -9 \u003cPID\u003e\n\n# Retry\nopencode auth login\n```\n\n**Windows (PowerShell):**\n```powershell\nnetstat -ano | findstr :51121\ntaskkill /PID \u003cPID\u003e /F\nopencode auth login\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDocker / WSL2 / Remote Development\u003c/b\u003e\u003c/summary\u003e\n\nOAuth callback requires browser to reach `localhost` on the machine running OpenCode.\n\n**WSL2:**\n- Use VS Code's port forwarding, or\n- Configure Windows → WSL port forwarding\n\n**SSH / Remote:**\n```bash\nssh -L 51121:localhost:51121 user@remote\n```\n\n**Docker / Containers:**\n- OAuth with localhost redirect doesn't work in containers\n- Wait 30s for manual URL flow, or use SSH port forwarding\n\n\u003c/details\u003e\n\n---\n\n### Configuration Key Typo: `plugin` not `plugins`\n\nThe correct key is `plugin` (singular):\n\n```json\n{\n  \"plugin\": [\"opencode-antigravity-auth@beta\"]\n}\n```\n\n**Not** `\"plugins\"` (will cause \"Unrecognized key\" error).\n\n---\n\n### Migrating Accounts Between Machines\n\nWhen copying `antigravity-accounts.json` to a new machine:\n1. Ensure the plugin is installed: `\"plugin\": [\"opencode-antigravity-auth@beta\"]`\n2. Copy `~/.config/opencode/antigravity-accounts.json`\n3. If you get \"API key missing\" error, the refresh token may be invalid — re-authenticate\n\n## Known Plugin Interactions\nFor details on load balancing, dual quota pools, and account storage, see [docs/MULTI-ACCOUNT.md](docs/MULTI-ACCOUNT.md).\n\n---\n\n## Plugin Compatibility\n\n### @tarquinen/opencode-dcp\n\nDCP creates synthetic assistant messages that lack thinking blocks. **List this plugin BEFORE DCP:**\n\n```json\n{\n  \"plugin\": [\n    \"opencode-antigravity-auth@latest\",\n    \"@tarquinen/opencode-dcp@latest\"\n  ]\n}\n```\n\n### oh-my-opencode\n\nDisable built-in auth and override agent models in `oh-my-opencode.json`:\n\n```json\n{\n  \"google_auth\": false,\n  \"agents\": {\n    \"frontend-ui-ux-engineer\": { \"model\": \"google/antigravity-gemini-3-pro\" },\n    \"document-writer\": { \"model\": \"google/antigravity-gemini-3-flash\" },\n    \"multimodal-looker\": { \"model\": \"google/antigravity-gemini-3-flash\" }\n  }\n}\n```\n\n\u003e **Tip:** When spawning parallel subagents, enable `pid_offset_enabled: true` in `antigravity.json` to distribute sessions across accounts.\n\n### Plugins you don't need\n\n- **gemini-auth plugins** — Not needed. This plugin handles all Google OAuth.\n\n---\n\n## Configuration\n\nCreate `~/.config/opencode/antigravity.json` for optional settings:\n\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json\"\n}\n```\n\nMost users don't need to configure anything — defaults work well.\n\n### Model Behavior\n\n| Option | Default | What it does |\n|--------|---------|--------------\n| `keep_thinking` | `false` | Preserve Claude's thinking across turns. **Warning:** enabling may degrade model stability. |\n| `session_recovery` | `true` | Auto-recover from tool errors |\n| `web_search.default_mode` | `\"off\"` | Gemini Google Search: `\"auto\"` or `\"off\"` |\n\n### Account Rotation\n\n| Your Setup | Recommended Config |\n|------------|-------------------|\n| **1 account** | `\"account_selection_strategy\": \"sticky\"` |\n| **2-5 accounts** | Default (`\"hybrid\"`) works great |\n| **5+ accounts** | `\"account_selection_strategy\": \"round-robin\"` |\n| **Parallel agents** | Add `\"pid_offset_enabled\": true` |\n\n### Rate Limit Scheduling\n\nControl how the plugin handles rate limits:\n\n| Option | Default | What it does |\n|--------|---------|--------------|\n| `scheduling_mode` | `\"cache_first\"` | `\"cache_first\"` = wait for same account (preserves prompt cache), `\"balance\"` = switch immediately, `\"performance_first\"` = round-robin |\n| `max_cache_first_wait_seconds` | `60` | Max seconds to wait in cache_first mode before switching accounts |\n| `failure_ttl_seconds` | `3600` | Reset failure count after this many seconds (prevents old failures from permanently penalizing accounts) |\n\n**When to use each mode:**\n- **cache_first** (default): Best for long conversations. Waits for the same account to recover, preserving your prompt cache.\n- **balance**: Best for quick tasks. Switches accounts immediately when rate-limited for maximum availability.\n- **performance_first**: Best for many short requests. Distributes load evenly across all accounts.\n\n### App Behavior\n\n| Option | Default | What it does |\n|--------|---------|--------------|\n| `quiet_mode` | `false` | Hide toast notifications |\n| `debug` | `false` | Enable debug logging |\n| `auto_update` | `true` | Auto-update plugin |\n\nFor all options, see [docs/CONFIGURATION.md](docs/CONFIGURATION.md).\n\n**Environment variables:**\n```bash\nOPENCODE_ANTIGRAVITY_DEBUG=1 opencode   # Enable debug logging\nOPENCODE_ANTIGRAVITY_DEBUG=2 opencode   # Verbose logging\n```\n\n---\n\n## Troubleshooting\n\nSee the full [Troubleshooting Guide](docs/TROUBLESHOOTING.md) for solutions to common issues including:\n\n- Auth problems and token refresh\n- \"Model not found\" errors\n- Session recovery\n- Gemini CLI permission errors\n- Safari OAuth issues\n- Plugin compatibility\n- Migration guides\n\n---\n\n## Documentation\n\n- [Configuration](docs/CONFIGURATION.md) — All configuration options\n- [Multi-Account](docs/MULTI-ACCOUNT.md) — Load balancing, dual quota pools, account storage\n- [Model Variants](docs/MODEL-VARIANTS.md) — Thinking budgets and variant system\n- [Troubleshooting](docs/TROUBLESHOOTING.md) — Common issues and fixes\n- [Architecture](docs/ARCHITECTURE.md) — How the plugin works\n- [API Spec](docs/ANTIGRAVITY_API_SPEC.md) — Antigravity API reference\n\n---\n\n## Support\n\nIf this plugin helps you, consider supporting its maintenance:\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S81QBOIR)\n\n---\n\n## Credits\n\n- [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) by [@jenslys](https://github.com/jenslys)\n- [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLegal\u003c/b\u003e\u003c/summary\u003e\n\n### Intended Use\n\n- Personal / internal development only\n- Respect internal quotas and data handling policies\n- Not for production services or bypassing intended limits\n\n### Warning\n\nBy using this plugin, you acknowledge:\n\n- **Terms of Service risk** — This approach may violate ToS of AI model providers\n- **Account risk** — Providers may suspend or ban accounts\n- **No guarantees** — APIs may change without notice\n- **Assumption of risk** — You assume all legal, financial, and technical risks\n\n### Disclaimer\n\n- Not affiliated with Google. This is an independent open-source project.\n- \"Antigravity\", \"Gemini\", \"Google Cloud\", and \"Google\" are trademarks of Google LLC.\n\n\u003c/details\u003e\n","funding_links":["https://github.com/sponsors/NoeFabris","https://ko-fi.com/noefabris","https://ko-fi.com/S6S81QBOIR"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNoeFabris%2Fopencode-antigravity-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNoeFabris%2Fopencode-antigravity-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNoeFabris%2Fopencode-antigravity-auth/lists"}