Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OpenCode plugin for Google Antigravity and Kiro APIs - Access Claude and Gemini models

License

Notifications You must be signed in to change notification settings

frankekn/vibe-open-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vibe-open-auth

License: MIT

OpenCode plugin for Google Antigravity and Kiro (AWS CodeWhisperer) APIs. Access Claude and Gemini models using Google or AWS credentials.

Fork of opencode-antigravity-auth with Kiro support and additional fixes.

What's New in v1.0.8

  • Thinking Recovery Fix - Uses SKIP_THOUGHT_SIGNATURE sentinel to bypass signature validation on cache miss, reducing "corrupted context" errors
  • Capacity Exhausted Switching - Auto-switches account on server capacity errors instead of waiting
  • Configurable Rate Limits - New default_retry_after_seconds and max_backoff_seconds options
  • Image Quota Fix - Correct wait time calculation for image generation models

Important: Plugin Conflict

If you're using oh-my-opencode, you must choose ONE of these plugins:

  • vibe-open-auth (this plugin - includes Kiro support)
  • opencode-antigravity-auth (upstream)

Both plugins register the same google provider. Using both will cause conflicts.

To use vibe-open-auth with oh-my-opencode:

  1. Edit ~/.config/opencode/opencode.json
  2. Remove opencode-antigravity-auth from the plugin array
  3. Add github:frankekn/vibe-open-auth instead

Features

  • Google Antigravity - Access Claude and Gemini via Google OAuth
  • Kiro (AWS) - Access Claude Opus/Sonnet via AWS Builder ID
  • Dual Quota System - Antigravity + Gemini CLI quota
  • Multi-Account Rotation - auto-switches on rate limit
  • Session Recovery - auto-recover from tool_result_missing errors

Installation

Add to ~/.config/opencode/opencode.json:

{
  "plugin": ["vibe-open-auth"],
  "provider": {
    "google": {
      "models": {
        "kiro-claude-opus-4-5": {
          "name": "Claude Opus 4.5 (Kiro)",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        },
        "kiro-claude-sonnet-4-5": {
          "name": "Claude Sonnet 4.5 (Kiro)",
          "limit": { "context": 200000, "output": 64000 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        },
        "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 } }
          }
        },
        "antigravity-gemini-3-flash": {
          "name": "Gemini 3 Flash (Antigravity)",
          "limit": { "context": 1048576, "output": 65536 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "thinkingLevel": "low" },
            "high": { "thinkingLevel": "high" }
          }
        }
      }
    }
  }
}

Alternative install methods:

// Pin to specific version
"plugin": ["[email protected]"]

// Or install from GitHub
"plugin": ["github:frankekn/vibe-open-auth"]

Note: Do NOT use @latest suffix (e.g., vibe-open-auth@latest) - there's a known OpenCode bug with this syntax.

Updates

General users should keep the plugin entry unpinned:

{ "plugin": ["vibe-open-auth"] }

On startup, the built-in auto-update checker queries npm:

  • If a newer version exists, it invalidates the cached package and shows a toast asking for restart.
  • If the entry is pinned (e.g., [email protected]) and auto_update is enabled, it updates the version in your config automatically.

Local path installs do not auto-update; switch to the npm entry above for updates.

Usage

# Kiro (requires Kiro IDE login first)
opencode run "Hello" --model=google/kiro-claude-opus-4-5

# Antigravity (requires Google OAuth)
opencode run "Hello" --model=google/antigravity-claude-opus-4-5-thinking --variant=max

Available Models

Kiro (AWS CodeWhisperer)

Requires: Login to Kiro IDE first (uses ~/.aws/sso/cache/kiro-auth-token.json)

All Kiro models have extended thinking enabled by default.

Model Description
kiro-claude-opus-4-5 Claude Opus 4.5 with extended thinking
kiro-claude-sonnet-4-5 Claude Sonnet 4.5 with extended thinking

Antigravity (Google)

Requires: opencode auth login with Google account

Model Variants
antigravity-gemini-3-pro low, high
antigravity-gemini-3-flash minimal, low, medium, high
antigravity-claude-sonnet-4-5 -
antigravity-claude-sonnet-4-5-thinking low, max
antigravity-claude-opus-4-5-thinking low, max

Gemini CLI

Model
gemini-2.5-flash
gemini-2.5-pro
gemini-3-flash-preview
gemini-3-pro-preview

Configuration

Create ~/.config/opencode/antigravity.json:

{
  "quiet_mode": false,
  "debug": false,
  "session_recovery": true,
  "auto_resume": true,
  "quota_fallback": false,
  "account_selection_strategy": "hybrid",
  "switch_on_first_rate_limit": true,
  "default_retry_after_seconds": 60,
  "max_backoff_seconds": 60,
  "quota_protection": {
    "enabled": true,
    "threshold_percentage": 10,
    "refresh_interval_seconds": 300,
    "monitored_models": [
      "claude-sonnet-4-5",
      "gemini-3-pro-high",
      "gemini-3-flash",
      "gemini-3-pro-image"
    ],
    "prefer_high_quota": true
  }
}

Enable Gemini web search grounding:

{
  "web_search": {
    "default_mode": "auto",
    "grounding_threshold": 0.3
  }
}

Debug mode:

OPENCODE_ANTIGRAVITY_DEBUG=1 opencode

Multi-Account

Add multiple Google accounts for higher quota:

opencode auth login

Accounts auto-rotate when rate limited.

Credits

License

MIT

About

OpenCode plugin for Google Antigravity and Kiro APIs - Access Claude and Gemini models

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 17