- Gemini 3.1 Pro Multi-turn Tool Call Error - Fixed a bug where Gemini thinking models (
gemini-3.1-pro-preview-customtools) would throw a400 INVALID_ARGUMENTerror (Function call is missing a thought_signature) during multi-turn tool execution. - Thought Signature Recovery - Added local cache recovery for
thoughtSignatureto prevent signature loss caused by the Vercel AI SDK stripping metadata when reconstructing conversation history. - Wrapped Request Injection - Correctly injects the recovered
thoughtSignatureintofunctionCallparts for Vercel AI SDK wrapped requests, ensuring seamless compatibility with OpenCode's execution loop.
- Proactive Context Overflow Guard - Implemented a pre-flight token estimator for Claude models that prevents sending requests exceeding the ~200k token limit.
- Auto-Compact Integration - Automatically triggers the OpenCode
/compactcommand and notifies the user via toast when an overflow is detected, returning an actionable synthetic response. - Session ID Tracking - Captures and tracks OpenCode session IDs to enable programmatic command execution.
- Gemini model safety gate - Added hard allowlist for known working Gemini text models to prevent accidental use of stale/unsupported model IDs.
- Legacy model redirects - Added compatibility redirects for common legacy names (
gemini-pro,gemini-flash, preview/customtools variants) to supported working targets.
- Validation scope - Gemini allowlist enforcement now applies only to pure Gemini text model paths, so Claude alias compatibility remains intact.
- Resolver tests - Updated model resolver tests to assert unsupported legacy Gemini IDs are rejected with explicit errors.
- Full isolated smoke run -
typecheck,vitest(28 files / 899 tests), and fulltest:e2e:modelsall passed. - Model E2E summary - 17/17 models passed in isolated environment.
- Gemini 3.1 Pro endpoint integration - Merged PR #2 (
aikazu/feat/update-gemini-3-1-pro) to align backend routing and model handling updates for Gemini 3.1 Pro flows.
- Typecheck stability - Fixed
src/plugin/accounts-quota.test.tsimports and storage typing to remove invalid symbol imports and pass strict TypeScriptverbatimModuleSyntaxchecks.
- Gemini E2E model suite - Confirmed passing runs for Gemini categories with isolated repo copies:
gemini-cli: 4/4 passed (google/gemini-3-flash-preview,google/gemini-3.1-pro-preview,google/gemini-2.5-pro,google/gemini-2.5-flash)antigravity-gemini: 3/3 passed (google/antigravity-gemini-3.1-pro-low,google/antigravity-gemini-3.1-pro-high,google/antigravity-gemini-3-flash)
- Sonnet fallback: retry
claude-sonnet-4-6automatically whenclaude-sonnet-4-6-thinkingreturns 404 from antigravity backend. - Windows E2E: run model/regression scripts with
opencode.cmdandshell: trueon win32 to avoid spawnENOENTfailures.
- Model scripts: normalize thinking model runs to use base model IDs plus explicit
--variantfor Sonnet/Opus checks.
- Models: migrated all Claude Sonnet references from 4.5 to 4.6 across runtime model config, resolver aliases, request handling, tests, and docs.
- Thinking: kept Sonnet thinking variants aligned with
claude-sonnet-4-6-thinkingand antigravity model keys used by OpenCode configs.
- Chore: remove
.flowcrate/flowcrate.dbfrom git tracking and add to gitignore to prevent sensitive local data leaks
- Release: automated npm publishing pipeline via GitHub Actions
- Quota: wire quota check results to rateLimitResetTimes for accurate auth menu badges (ab276a7)
- Ui: show rate-limited family detail with countdown in auth menu badges (d5f935e)
- Chore: remove temporary test output files (62ef7a4)
- Chore: final cleanup of package references and comments (641f6fe)
- Docs: update repo references in documentation (4758a6d)
- Docs: consistency update for branding and strict quota explanation (2dbce88)
- Docs: update branding, credits, and donation info (8f43b92)
- Chore: prepare release 1.5.2 (47efecd)
- Fix: auto-clear verification flags after successful requests (80f25f2)
- Strict Soft Quota Locking - Accounts exceeding the soft quota threshold (confgurable, default 70%) are now strictly locked until their specific quota reset time, ignoring cache TTL. This prevents "leaky" usage where expiring cache allowed over-quota accounts to be reused before they were actually replenished.
- Proxy Support - Added support for
undiciProxyAgent, allowing the plugin to work behind corporate proxies via standard environment variables. - Oh-My-OpenCode Integration - integrated session recovery features from
oh-my-opencode:- Tool Crash Recovery: Automatically fixes
tool_result_missingerrors when operations are cancelled. - Thinking Block Recovery: Fixes corrupted or out-of-order thinking blocks.
- Strip Illegal Thinking: Automatically removes thinking blocks when switching to models that don't support them.
- Tool Crash Recovery: Automatically fixes
- Interactive Quota Pause - The
checkcommand now pauses after displaying the quota table, giving users time to read the stats before the command exits or proceeds.
- Quota Threshold Buffer - Default
soft_quota_threshold_percentlowered from 90% to 70% to provide a safer 30% buffer against accidental overage and bans.
- Gemini 400 Bad Request - Fixed an issue where the
x-goog-user-projectheader caused 400 errors for users without the Cloud Code API enabled on their project. This header is now stripped from requests.
-
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.