-
#397 - Gemini tool-call payload handling now enforces valid
thought_signaturebehavior forfunctionCallparts, preventing400 INVALID_ARGUMENTin mixed and parallel call turns. -
#454 - Request sanitization now removes empty/invalid
contents.partsentries and invalidsystemInstruction.partsbefore forwarding to Antigravity. -
#444 - Response transform fallback now uses cloned responses and preserves recovery signaling, eliminating
Body already usedfailures. -
#368 (Tackled) - Claude thinking/signature handling now replaces foreign signatures with sentinels and tightens thinking-order classification to reduce false-positive recovery triggers.
-
Debug Sink Split -
debugnow controls file logging only, whiledebug_tuiindependently controls TUI panel logging. -
Header Normalization -
x-goog-user-projectis now stripped across Antigravity and Gemini CLI request styles. -
Claude Prompt Auto-Caching (Optional) - Added
claude_prompt_auto_cachingto injectcache_control: { type: "ephemeral" }when Claude prompt caching is desired and unset.
- Updated README, architecture/config/troubleshooting docs, and generated schema docs to reflect new debug sink semantics and config keys.
- Added support for Sonnet 4.6 and removed old models support.
-
Header Identity Alignment -
ideTypechanged fromIDE_UNSPECIFIEDtoANTIGRAVITYandplatformfromPLATFORM_UNSPECIFIEDto dynamicWINDOWS/MACOS(based onprocess.platform) across all header sources (getAntigravityHeaders,oauth.ts,project.ts). Now matches Antigravity Manager behavior -
Gemini CLI
Client-MetadataHeader - Gemini CLI requests now includeClient-Metadataheader, aligning with actualgemini-clibehavior. Previously only Antigravity-style requests sent this header -
Gemini CLI User-Agent Format - Updated from
GeminiCLI/{ver}/{model}toGeminiCLI/{ver}/{model} ({platform}; {arch})to match realgemini-cliUA strings. Version pool updated from1.2.0/1.1.0/1.0.0to0.28.0/0.27.4/0.27.3to align with actual release numbers -
Randomized Headers Model-Aware -
getRandomizedHeaders()now accepts an optionalmodelparameter, embedding the actual model name in Gemini CLI User-Agent strings instead of a hardcoded default -
Fingerprint Platform Alignment - Antigravity-style
Client-Metadataplatform now consistently matches the randomized User-Agent platform, fixing a potential mismatch where headers could disagree on reported platform
-
Linux Fingerprints - Removed
linux/amd64andlinux/arm64fromANTIGRAVITY_PLATFORMSand fingerprint generation. Linux users now masquerade as macOS (Antigravity does not support Linux as a native platform) -
getAntigravityUserAgents()Function - Removed unused helper that had no callers in the codebase -
X-Opencode-Tools-DebugHeader - Removed debug telemetry header from outgoing requests
-
Account Verification Flow - Auth login menu now supports
verifyandverify-allactions. When Antigravity returns a 403 withvalidation_required, the account is automatically disabled, marked with a verification URL, and cooled down. Users can verify accounts directly from the menu with a probe request to confirm resolution -
Dynamic Antigravity Version - Plugin version is now fetched at startup from the Antigravity updater API, with a changelog-scrape fallback and a hardcoded last-resort. Eliminates stale "version no longer supported" errors after Antigravity updates
-
Storage V4 Schema - New storage version adds
verificationRequired,verificationRequiredAt,verificationRequiredReason,verificationUrl, andfingerprintHistoryfields per account. Full migration chain from v1/v2/v3 to v4 -
saveAccountsReplace- New destructive-write storage function that replaces the entire accounts file without merging, preventing deleted accounts from being resurrected by concurrent reads -
setAccountEnabled/ Account Toggling - New account management methods:setAccountEnabled(),markAccountVerificationRequired(),clearAccountVerificationRequired(),removeAccountByIndex() -
Secure File Permissions - Credential storage files are now created with mode
0600(owner read/write only). Existing files with overly permissive modes are tightened on load -
opencode.jsoncSupport - Configure models flow now detects and prefers existingopencode.jsoncfiles. JSONC parsing strips comments and trailing commas before JSON.parse -
Header Contract Tests - New
src/constants.test.tsvalidates header shapes, randomization behavior, and optional header fields for both Antigravity and Gemini CLI styles
-
Unified Gemini Routing - Gemini quota fallback between Antigravity and Gemini CLI pools is now always enabled for Gemini models. The
quota_fallbackconfig flag is deprecated and ignored (backward-compatible, no breakage) -
cli_firstHonored in Routing -resolveHeaderRoutingDecision()centralizes routing logic and properly respectscli_firstfor unsuffixed Gemini models -
Fingerprint Headers Simplified -
buildFingerprintHeaders()now returns onlyUser-Agent. RemovedX-Goog-QuotaUser,X-Client-Device-Id,X-Goog-Api-Client, andClient-Metadatafrom outgoing content requests to align with Antigravity Manager behavior -
Client Metadata Reduced - Fingerprint client metadata trimmed to
ideType,platform,pluginTypeonly. RemovedosVersion,arch,sqmId -
Gemini CLI User-Agent Format - Updated from
google-genai-sdk/...toGeminiCLI/...format -
Search Model - Changed from
gemini-2.0-flashtogemini-2.5-flashfor improved search result quality -
Deterministic Search Generation - Search requests now use
temperature: 0andtopP: 1instead of thinking config -
OAuth Headers Dynamic -
oauth.tsandproject.tsnow usegetAntigravityHeaders()instead of static constants, removing staleX-Goog-Api-Clientfrom token/project calls
- #410: Strip
x-goog-user-projectheader for ALL header styles, not just Antigravity. This header caused 403 errors on Daily/Prod endpoints when the user's GCP project lacked Cloud Code API - #370 / #336: Account deletion now persists correctly. Root cause:
saveAccounts()merged deleted accounts back from disk. Fixed by introducingsaveAccountsReplace()for destructive writes and syncing in-memory state immediately - #381: Disabled accounts no longer selected via sticky index.
getCurrentAccountForFamily()now skips disabled accounts and advances the active index - #384:
google_searchtool no longer returns empty citations when usinggemini-3-flash. Search model switched togemini-2.5-flash - #377: Configure models flow now respects existing
opencode.jsoncfiles instead of creating duplicateopencode.json - Excessive Disk Writes - Fixed project context auth updates causing 3000+ writes/sec during streaming. Changed from reference equality to value comparison on auth tokens and added throttled saves. Prevents SSD wear on macOS
- Fingerprint Alignment - Force-regenerated fingerprints to match current Antigravity Manager behavior, fixing
ideTypeand stripping stale client metadata fields
- Extra Outgoing Headers -
X-Goog-Api-Client,Client-Metadata,X-Goog-QuotaUser,X-Client-Device-Idno longer sent on content requests - Fingerprint Metadata Fields -
osVersion,arch,sqmIdremoved from fingerprint client metadata updateFingerprintVersionHelper - Removed from accounts module (fingerprint version rewriting no longer needed)
- AGENTS.md expanded with detailed architecture, code style, and fingerprint system documentation
- README.md, CONFIGURATION.md, MULTI-ACCOUNT.md updated to reflect deprecated
quota_fallbackand automatic Gemini pool fallback behavior antigravity.schema.jsonmarksquota_fallbackas deprecated/ignored
-
Configure Models Menu Action - Auth login menu now includes a "Configure models" action that writes plugin model definitions directly into
opencode.json, making setup easier for new users -
cli_firstConfig Option - New configuration option to route Gemini models to Gemini CLI quota first, useful for users who want to preserve Antigravity quota for Claude models -
toast_scopeConfiguration - Control toast visibility per session withtoast_scope: "root_only"to suppress toasts in subagent sessions -
Soft Quota Protection - Skip accounts over 90% usage threshold to prevent Google penalties, with configurable
soft_quota_threshold_percentand wait/retry behavior -
Gemini CLI Quota Management - Enhanced quota display with dual quota pool support (Antigravity + Gemini CLI)
-
OPENCODE_CONFIG_DIREnvironment Variable - Custom config location support for non-standard setups -
quota_refresh_interval_minutes- Background quota cache refresh (default 15 minutes) -
soft_quota_cache_ttl_minutes- Cache freshness control for soft quota checks
-
Model Naming and Routing - Documented antigravity-prefixed model names and automatic mapping to CLI preview names (e.g.,
antigravity-gemini-3-flash→gemini-3-flash-preview) -
Antigravity-First Quota Strategy - Exhausts Antigravity quota across ALL accounts before falling back to Gemini CLI quota (previously per-account)
-
Quota Routing Respects
cli_first- Fallback behavior updated to respectcli_firstpreference -
Config Directory Resolution - Now prioritizes
OPENCODE_CONFIG_DIRenvironment variable -
Enhanced Debug Logging - Process ID included for better traceability across concurrent sessions
-
Improved Quota Group Resolution - More consistent quota management with
resolveQuotaGroupfunction
- #337: Skip disabled accounts in proactive token refresh
- #233: Skip sandbox endpoints for Gemini CLI models (fixes 404/403 cascade)
- Windows Config Auto-Migration: Automatically migrates config from
%APPDATA%\opencode\to~/.config/opencode/ - Root Session Detection: Reset
isChildSessionflag correctly for root sessions - Stale Quota Cache: Prevent spin loop on stale quota cache
- Quota Group Default: Fix quota group selection defaulting to
gemini-prowhen model is null
- Fingerprint Headers for Gemini CLI - Removed fingerprint headers from Gemini CLI model requests to align with official behavior
web_searchConfiguration Leftovers - Cleaned up remainingweb_searchconfig remnants from schema
- Updated README with model configuration options and simplified setup instructions
- Updated MODEL-VARIANTS.md with Antigravity model names and configuration guidance
- Updated CONFIGURATION.md to clarify
quota_fallbackbehavior across accounts - Updated MULTI-ACCOUNT.md with dual quota pool and fallback flow details
-
Quota check and account management in auth login - Added new
--quotaand--manageoptions to theauth logincommand for checking account quota status and managing accounts directly from the CLI (#284) -
Request timing jitter - Added configurable random delay to requests to reduce detection patterns and improve rate limit resilience. Requests now include small random timing variations
-
Header randomization for fingerprint diversity - Headers are now randomized to create more diverse fingerprints, reducing the likelihood of requests being grouped and rate-limited together
-
Per-account fingerprint persistence - Fingerprints are now persisted per-account in storage, allowing consistent identity across sessions and enabling fingerprint history tracking
- Added fingerprint restore operations to AccountManager
- Extended per-account fingerprint history for better tracking
- Fingerprint now shown in debug output
-
Scheduling mode configuration - Added new scheduling modes including
cache-firstmode that prioritizes accounts with cached tokens, reducing authentication overhead -
Failure count TTL expiration - Account failure counts now expire after a configurable time period, allowing accounts to naturally recover from temporary issues
-
Exponential backoff for 503/529 errors - Implemented exponential backoff with jitter for capacity-related errors, matching behavior of Antigravity-Manager
-
Increased MODEL_CAPACITY backoff to 45s with jitter - Extended the base backoff time for model capacity errors from previous values to 45 seconds, with added jitter to prevent thundering herd issues
-
Regenerate fingerprint after capacity retry exhaustion - When all capacity retries are exhausted, the fingerprint is now regenerated to potentially get assigned to a different backend partition
-
Enhanced duration parsing for Go format - Improved parsing of duration strings to handle Go-style duration formats (e.g.,
1h30m) used in some API responses
-
Prevent toast spam for rate limit warnings - Added 5-second debounce for rate limit warning toasts to prevent notification flooding when multiple requests hit rate limits simultaneously (#286)
-
getEnabledAccountsnow treats undefined as enabled - Fixed issue where accounts without an explicitenabledfield were incorrectly filtered out. Accounts now default to enabled when the field is undefined -
Show correct position in account toast for enabled accounts - Fixed the account position indicator in toast notifications to only count enabled accounts, showing accurate position like "Account 2/5" instead of including disabled accounts
-
Filter disabled accounts in all selection methods - Ensured disabled accounts are properly excluded from all account selection strategies (round-robin, least-used, random, etc.)
-
Robust handling for capacity/5xx errors - Implemented comprehensive retry logic for model capacity and server errors, achieving parity with Antigravity-Manager's behavior
- Reordered parsing logic to prioritize capacity checks
- Fixed loop retry logic to prevent state pollution
- Added capacity retry limit to prevent infinite loops (#263)
-
Fixed @opencode-ai/plugin dependency location - Moved
@opencode-ai/pluginfrom devDependencies to dependencies section, fixing runtime errors when the plugin was installed without dev dependencies
- Removed deprecated
web_searchconfiguration - The deprecatedweb_search.default_modeandweb_search.grounding_thresholdconfiguration options have been fully removed. Use thegoogle_searchtool instead (introduced in 1.3.1)
- New
google_searchtool for web search - Implements Google Search grounding as a callable tool that the model can invoke explicitly- Makes separate API calls with only
{ googleSearch: {} }tool, avoiding Gemini API limitation where grounding tools cannot be combined with function declarations - Returns formatted markdown with search results, sources with URLs, and search queries used
- Supports optional URL analysis via
urlContextwhen URLs are provided - Configurable thinking mode (deep vs fast) for search operations
- Uses
gemini-3-flashmodel for fast, cost-effective search operations
- Makes separate API calls with only
- Upgraded to Zod v4 and adjusted schema generation for compatibility
- Deprecated
web_searchconfig - Theweb_search.default_modeandweb_search.grounding_thresholdconfig options are now deprecated. Google Search is now implemented as a dedicated tool rather than automatic grounding injection
-
keep_thinking=truenow works without debug mode - Fixed Claude multi-turn conversations failing with "Failed to process error response" whenkeep_thinking=trueafter tool calls, unless debug mode was enabled- Root cause:
filterContentArraytrusted any signature >= 50 chars for last assistant messages, but Claude returns its own signatures that Antigravity doesn't recognize - Fix: Now verifies signatures against our cache via
isOurCachedSignature()before passing through. Foreign/missing signatures get replaced withSKIP_THOUGHT_SIGNATUREsentinel - Why debug worked: Debug mode injects synthetic thinking with no signature, triggering sentinel injection correctly
- Root cause:
-
Fixed tool calls failing for tools with no parameters - Tools like
hive_plan_read,hive_status, andhive_feature_listthat have no required parameters would fail with Zod validation errorstate.input: expected record, received undefined- Root cause: When Claude calls a tool with no parameters, it returns
functionCallwithout anargsfield. The response transformation only processed parts wherefunctionCall.argswas defined, leavingargsasundefined - Fix: Changed condition to handle all
functionCallparts, defaultingargsto{}when missing, ensuring opencode'sstate.inputalways receives a valid record
- Root cause: When Claude calls a tool with no parameters, it returns
-
Auth headers aligned with official Gemini CLI - Updated authentication headers to match the official Antigravity/Gemini CLI behavior, reducing "account ineligible" errors and potential bans (#178)
GEMINI_CLI_HEADERS["User-Agent"]:9.15.1→10.3.0GEMINI_CLI_HEADERS["X-Goog-Api-Client"]:gl-node/22.17.0→gl-node/22.18.0ANTIGRAVITY_HEADERS["User-Agent"]: Updated to full Chrome/Electron user agent string- Token exchange now includes
Accept,Accept-Encoding,User-Agent,X-Goog-Api-Clientheaders - Userinfo fetch now includes
User-Agent,X-Goog-Api-Clientheaders fetchProjectIDnow uses centralized constants instead of hardcoded strings
-
quiet_modenow properly suppresses all toast notifications - Fixedquiet_mode: trueinantigravity.jsonnot suppressing "Status dialog dismissed" and other toast notifications (#207)- Root cause: The
showToasthelper function didn't checkquietMode, and only some call sites had manual!quietMode &&guards - Fix: Moved
quietModecheck insideshowToasthelper so all toasts are automatically suppressed whenquiet_mode: true
- Root cause: The
- Removed automatic
googleSearchinjection - Previously attempted to inject{ googleSearch: {} }into all Gemini requests, which never worked due to API limitations. Now uses the explicit tool approach instead
See releases for previous versions.