Configuration

April 28, 2026 · View on GitHub

Create ~/.config/opencode/antigravity.json (or .opencode/antigravity.json in project root):

{
  "$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json"
}

Most settings have sensible defaults — only configure what you need.


Quick Start

Minimal config (recommended for most users):

{
  "$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json"
}

With web search enabled:

The plugin provides a google_search tool that the model can call to search the web. No configuration is needed - the tool is always available.


Model Behavior

Settings that affect how the model thinks and responds.

OptionDefaultDescription
keep_thinkingfalsePreserve Claude's thinking blocks across turns. Warning: enabling may degrade model stability.
session_recoverytrueAuto-recover from tool_result_missing errors
auto_resumefalseAuto-send resume prompt after recovery
resume_text"continue"Text to send when auto-resuming

Note: The web_search config options are deprecated. Google Search is now implemented as a dedicated google_search tool that the model can call explicitly.

About keep_thinking

When true, Claude's thinking blocks are preserved in conversation history:

  • Pros: Model remembers its reasoning, more coherent across turns
  • Cons: May degrade model stability, slightly larger context

When false (default), thinking is stripped:

  • Pros: More stable model behavior, smaller context
  • Cons: Model may be less coherent, forgets previous reasoning

Account Rotation

Settings for managing multiple Google accounts.

OptionDefaultDescription
account_selection_strategy"hybrid"How to select accounts
switch_on_first_rate_limittrueSwitch account immediately on first 429
pid_offset_enabledfalseDistribute sessions across accounts (for parallel agents)
quota_fallbackfalseDeprecated (ignored). Kept for backward compatibility; Gemini fallback is automatic

Strategy Guide

Your SetupRecommended StrategyWhy
1 account"sticky"No rotation needed, preserve prompt cache
2-3 accounts"hybrid" (default)Smart rotation with health scoring
4+ accounts"round-robin"Maximum throughput
Parallel agents"round-robin" + pid_offset_enabled: trueDistribute across accounts

Available Strategies

StrategyBehaviorBest For
stickySame account until rate-limitedSingle account, prompt cache
round-robinRotate on every requestMaximum throughput
hybridHealth score + token bucket + LRUSmart distribution (default)

App Behavior

Settings that control plugin behavior.

OptionDefaultDescription
quiet_modefalseHide toast notifications (except recovery)
debugfalseEnable debug logging
log_dirOS defaultCustom directory for debug logs
auto_updatetrueEnable automatic plugin updates

Debug Logging

{
  "debug": true,
  "debug_tui": true
}

Logs are written to ~/.config/opencode/antigravity-logs/ (or log_dir if set).


Copy-paste ready configs with recommended settings pre-applied.

1 Account

{
  "$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json",
  "account_selection_strategy": "sticky"
}

Why these settings:

  • sticky — No rotation needed, preserves Anthropic prompt cache

2-3 Accounts

{
  "$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json",
  "account_selection_strategy": "hybrid"
}

Why these settings:

  • hybrid — Smart rotation using health scores, avoids bad accounts

3+ Accounts (Power Users / Parallel Agents)

{
  "$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json",
  "account_selection_strategy": "round-robin",
  "switch_on_first_rate_limit": true,
  "pid_offset_enabled": true
}

Why these settings:

  • round-robin — Maximum throughput, rotates every request
  • switch_on_first_rate_limit — Immediately switch on 429 (default: true)
  • pid_offset_enabled — Different sessions use different starting accounts

What's Enabled by Default

These settings are already true by default — you don't need to set them:

SettingDefaultWhat it does
session_recoverytrueAuto-recover from errors
auto_updatetrueKeep plugin updated
switch_on_first_rate_limittrueFast account switching

These settings are false by default:

SettingDefaultWhat it does
keep_thinkingfalsePreserve Claude thinking (may degrade stability)
auto_resumefalseAuto-continue after recovery

Advanced Settings

These settings are for edge cases. Most users don't need to change them.

Error Recovery (internal)
OptionDefaultDescription
empty_response_max_attempts4Retries for empty API responses
empty_response_retry_delay_ms2000Delay between retries
tool_id_recoverytrueFix mismatched tool IDs from context compaction
claude_tool_hardeningtruePrevent tool parameter hallucination
max_rate_limit_wait_seconds300Max wait time when rate limited (0=unlimited)
Token Management (internal)
OptionDefaultDescription
proactive_token_refreshtrueRefresh tokens before expiry
proactive_refresh_buffer_seconds1800Refresh 30 min before expiry
proactive_refresh_check_interval_seconds300Check interval
Signature Cache (internal)

Used when keep_thinking: true. Most users don't need to configure this.

OptionDefaultDescription
signature_cache.enabledtrueEnable disk caching
signature_cache.memory_ttl_seconds3600In-memory cache TTL (1 hour)
signature_cache.disk_ttl_seconds172800Disk cache TTL (48 hours)
signature_cache.write_interval_seconds60Background write interval
Health Score Tuning (internal)

Used by hybrid strategy. Most users don't need to configure this.

OptionDefaultDescription
health_score.initial70Starting health score
health_score.success_reward1Points added on success
health_score.rate_limit_penalty-10Points removed on rate limit
health_score.failure_penalty-20Points removed on failure
health_score.recovery_rate_per_hour2Points recovered per hour
health_score.min_usable50Minimum score to use account
health_score.max_score100Maximum health score
Token Bucket Tuning (internal)

Used by hybrid strategy. Most users don't need to configure this.

OptionDefaultDescription
token_bucket.max_tokens50Maximum tokens in bucket
token_bucket.regeneration_rate_per_minute6Tokens regenerated per minute
token_bucket.initial_tokens50Starting tokens