Opencode plugin: Google OAuth access to Antigravity
This project integrates Antigravity models into Opencode via Google OAuth, offering multi-account and dual-quota routing to extend model availability; however, it carries real risks including potential violation of Google ToS, account bans, and unclear license/maintenance, making it suitable for experimental use by users who can tolerate these risks.
GitHub NoeFabris/opencode-antigravity-auth Updated 2026-02-10 Branch main Stars 8.2K Forks 551
Mixed/Unknown Opencode plugin Model access Multi-account & quota routing

💡 Deep Analysis

5
What exact problem does this plugin solve? How does it expose Google Antigravity / Gemini / Claude advanced models and quotas to users within Opencode?

Core Analysis

Project Positioning: This plugin bridges Opencode and Google’s Antigravity via OAuth so local/CLI users can call advanced models (e.g., gemini-3-pro, claude-opus-4-5-thinking) and leverage Antigravity-provided rate limits.

Technical Features

  • OAuth session bridging: Uses opencode auth login to obtain Google session tokens that are used to access Antigravity endpoints.
  • Model definition injection: Adds provider/model entries into ~/.config/opencode/opencode.json so Opencode recognizes Antigravity models and variants.
  • Policy-based routing: Requests are routed between Antigravity and Gemini CLI according to antigravity-first, cli_first, or quota_fallback strategies.
  • Multi-account auto-rotation: Automatically rotates between stored Google accounts when rate limits are hit to increase throughput.
  • Thinking & Search grounding: Exposes configurable thinkingBudget/thinkingLevel variants and optional web-search grounding for Gemini.

Practical Steps

  1. Test with a non-critical, established Google account: run opencode auth login, then verify with opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max.
  2. Configure multiple accounts in opencode.json and enable rotation to spread requests across quotas.
  3. Keep the opencode.json under version control to track model definitions and routing changes.

Important Notice: The README warns of ToS risk and account bans; use only accounts that can be sacrificed or in controlled testing.

Summary: The plugin composes authentication, model configuration, and quota routing into a usable Opencode integration that unlocks Google high-tier models for CLI usage, while introducing compliance and account-safety tradeoffs.

87.0%
How do the plugin's 'thinking' model variants work? What practical impacts do they have on inference quality, cost, and context/budget?

Core Analysis

Core Question: The plugin exposes thinkingBudget/thinkingLevel as model variants so users can run specific models with adjustable “thinking” intensity, trading off quality for latency and quota consumption.

Technical Analysis

  • How it works:
  • Model variants (low, max, etc.) are defined in opencode.json. The plugin maps these variants to backend parameters (longer inference steps, extra internal passes, or additional retrieval) when calling Antigravity/Gemini.
  • The plugin does not change model weights—only the execution budget/behavior.

  • Impact on quality/cost:

  • Quality: Higher thinking levels usually improve multi-step reasoning and complex task performance.
  • Latency: Higher levels increase response time due to more computation or retrieval.
  • Quota/Cost: Higher consumption leads to faster quota depletion and higher cost per request.

Practical Recommendations

  1. Reserve max for high-value or complex reasoning tasks.
  2. Use low/minimal for bulk or latency-sensitive workloads.
  3. Monitor latency and quota per variant and tune defaults accordingly.
  4. Use quota_fallback to gracefully degrade to cheaper models when quotas are tight.

Important Note: Backends may interpret “thinking” parameters differently, causing inconsistent behavior across Antigravity vs CLI.

Summary: Thinking variants allow controlled trade-offs between inference depth and resource usage. They are valuable for complex reasoning but must be used judiciously to manage latency and quota costs.

86.0%
What is the first-time user experience like? What is the learning curve, common configuration mistakes, and best practices to reduce risk and improve stability?

Core Analysis

Core Question: First-time users need to correctly configure opencode.json, complete Google OAuth, understand routing/variant policies, and manage account/quota health.

Technical Analysis (Learning curve & common mistakes)

  • Learning curve: Moderate—users must learn the ~/.config/opencode/opencode.json format, opencode auth login flow, model/variant naming, and routing strategies. Understanding the cost/latency implications of thinking/grounding features is also necessary.

  • Common mistakes:

  • JSON or path errors that prevent Opencode from loading models.
  • Mis-specified provider/model fields leading to wrong routing.
  • Not enabling multi-account rotation, quickly exhausting one account.
  • Ignoring token refresh flows, causing repeated auth failures.

Best Practices

  1. Use established Google accounts rather than brand-new ones to reduce ban risk.
  2. Validate step-by-step: install plugin -> opencode auth login -> run the README verification command.
  3. Put opencode.json under version control for rollbacks and audits.
  4. Enable logging/monitoring for fallbacks and per-account health metrics.
  5. Default to low/minimal variants for bulk workloads; use max selectively.

Important Notice: The README warns of ToS and account-ban risk; avoid using in production-critical systems without risk assessment.

Summary: Setup has moderate complexity but is manageable with stepwise validation, config versioning, and monitoring to maintain stability and limit exposure.

86.0%
How are the dual-quota (Antigravity + Gemini CLI) and routing strategies implemented? What advantages and risks does this architecture bring?

Core Analysis

Core Question: The plugin exposes Antigravity and Gemini CLI quotas as two resource pools and routes requests between them according to configurable policies (e.g., antigravity-first, cli_first, quota_fallback) to increase availability and throughput.

Technical Analysis

  • Key implementation pieces:
  • Session & quota tracking: Maintain per-account session tokens and rate-limit metadata.
  • Policy decision layer: Choose the preferred target before dispatching a request.
  • Model compatibility layer: Translate model names/parameters (e.g., thinking variants) to the target API.
  • Failure fallback: On errors or session problems, automatically fall back to the other quota and log the event.

  • Architectural advantages:

  • Larger effective quota pool via multi-account + dual quotas.
  • Operational flexibility to prefer higher-tier sources for certain models.
  • Resilience through automatic fallback when one source is limited.

Practical Advice

  1. Define explicit routing rules in opencode.json per model class (e.g., thinking models => Antigravity).
  2. Monitor fallback events and rotate or add accounts if one pool is exhausted.
  3. Test rate-limit and failure scenarios to validate rotation and fallback logic.

Important Note: This architecture depends on private/undocumented behaviors of Antigravity/Gemini CLI; backend changes can break the integration.

Summary: Dual-quota policy routing provides measurable availability and flexibility gains but raises complexity, debugging cost, and fragility to upstream changes.

84.0%
How does multi-account auto-rotation work? What performance and stability impacts does it have in real usage?

Core Analysis

Core Question: Multi-account auto-rotation manages multiple stored Google OAuth sessions and dynamically switches accounts when rate limits or errors are encountered to increase available quota and continuity.

Technical Analysis

  • Implementation elements:
  • Token store: Secure local storage of multiple OAuth tokens (e.g., under ~/.config/opencode).
  • Rotation policy: Round-robin, priority by health, or quota-aware load balancing.
  • Health checks: Mark accounts as throttled/unusable based on HTTP status codes and failure rates.
  • Auto-recovery: Reintroduce accounts after cooldown or successful token refresh.

  • Performance impacts:

  • Latency from token refreshes and switching, especially under high concurrency.
  • Uneven throughput because accounts have differing quotas/limits.
  • Concurrency safety concerns—need locks/queues to avoid overusing a single account concurrently.

Practical Advice

  1. Add multiple stable Google accounts (avoid brand-new ones) and enable health checks.
  2. Implement preemptive token refresh to avoid on-demand refresh latency.
  3. Monitor per-account success/fallback rates and adjust rotation policies.
  4. Design concurrency controls so multiple threads/processes don’t consume one account’s quota at once.

Important Note: Rotation increases availability but cannot eliminate account risk (bans, shadow-bans) nor prevent upstream policy changes.

Summary: Multi-account rotation is effective for short-term quota scaling, but requires careful token lifecycle handling, concurrency controls, and active monitoring.

83.0%

✨ Highlights

  • Direct access to Gemini and Claude models via Google OAuth
  • Supports multi-account, dual-quota with auto-rotation and fallback
  • May trigger Google service restrictions or account bans; high risk
  • License and active contributor status unclear; maintenance and compliance uncertain

🔧 Engineering

  • Integrates Antigravity (Google IDE) into Opencode via OAuth
  • Provides multi-account management, automatic quota routing and session auto-recovery
  • Enables access to Gemini 3 Pro/Flash and Claude Opus/Sonnet series
  • Compatible with other OpenCode plugins and supports model config import

⚠️ Risks

  • Using this plugin may violate Google's Terms of Service and lead to account suspension
  • Repository license unknown and no contributors/releases — poses long-term maintenance risk
  • Handling OAuth credentials and multi-account rotation raises privacy and security concerns

👥 For who?

  • Advanced developers and researchers willing to accept compliance and stability risks
  • Users needing temporary or experimental access to Antigravity/Gemini/Claude models
  • Not suitable for production environments requiring strict account reliability or compliance