diff --git a/assets/antigravity.schema.json b/assets/antigravity.schema.json index ec3c047..ea1279e 100644 --- a/assets/antigravity.schema.json +++ b/assets/antigravity.schema.json @@ -10,6 +10,15 @@ "type": "boolean", "description": "Suppress most toast notifications (rate limit, account switching). Recovery toasts always shown. Env: OPENCODE_ANTIGRAVITY_QUIET=1" }, + "toast_scope": { + "default": "root_only", + "type": "string", + "enum": [ + "root_only", + "all" + ], + "description": "Controls which sessions show toast notifications. 'root_only' (default) shows in root session only, 'all' shows in all sessions." + }, "debug": { "default": false, "type": "boolean", @@ -154,6 +163,30 @@ "default": true, "type": "boolean" }, + "scheduling_mode": { + "default": "cache_first", + "type": "string", + "enum": [ + "cache_first", + "balance", + "performance_first" + ], + "description": "Rate limit scheduling strategy. 'cache_first' (default) waits for cooldowns, 'balance' distributes across accounts, 'performance_first' picks fastest available." + }, + "max_cache_first_wait_seconds": { + "default": 60, + "type": "number", + "minimum": 5, + "maximum": 300, + "description": "Maximum seconds to wait for a rate-limited account in cache_first mode before switching." + }, + "failure_ttl_seconds": { + "default": 3600, + "type": "number", + "minimum": 60, + "maximum": 7200, + "description": "Time in seconds before a failed account is eligible for retry." + }, "default_retry_after_seconds": { "default": 60, "type": "number", @@ -166,6 +199,42 @@ "minimum": 5, "maximum": 300 }, + "request_jitter_max_ms": { + "default": 0, + "type": "number", + "minimum": 0, + "maximum": 5000, + "description": "Maximum random jitter in milliseconds added to outgoing requests to avoid thundering herd." + }, + "soft_quota_threshold_percent": { + "default": 90, + "type": "number", + "minimum": 1, + "maximum": 100, + "description": "Percentage of quota usage that triggers soft quota warnings and preemptive account switching." + }, + "quota_refresh_interval_minutes": { + "default": 15, + "type": "number", + "minimum": 0, + "maximum": 60, + "description": "Interval in minutes between quota usage checks. Set to 0 to disable periodic checks." + }, + "soft_quota_cache_ttl_minutes": { + "default": "auto", + "anyOf": [ + { + "type": "string", + "const": "auto" + }, + { + "type": "number", + "minimum": 1, + "maximum": 120 + } + ], + "description": "TTL for cached soft quota data. 'auto' (default) calculates from refresh interval, or set a fixed number of minutes." + }, "health_score": { "type": "object", "properties": { diff --git a/script/build-schema.ts b/script/build-schema.ts index 32e1e25..edbb5fb 100644 --- a/script/build-schema.ts +++ b/script/build-schema.ts @@ -46,6 +46,26 @@ const envVarDescriptions: Record = { proactive_refresh_check_interval_seconds: "Interval between proactive refresh checks in seconds.", auto_update: "Enable automatic plugin updates. Env: OPENCODE_ANTIGRAVITY_AUTO_UPDATE=1", + quota_fallback: + "Deprecated: accepted for backward compatibility but ignored at runtime. Gemini fallback between Antigravity and Gemini CLI is always enabled.", + cli_first: + "Prefer gemini-cli routing before Antigravity for Gemini models. When false (default), Antigravity is tried first and gemini-cli is fallback.", + toast_scope: + "Controls which sessions show toast notifications. 'root_only' (default) shows in root session only, 'all' shows in all sessions.", + scheduling_mode: + "Rate limit scheduling strategy. 'cache_first' (default) waits for cooldowns, 'balance' distributes across accounts, 'performance_first' picks fastest available.", + max_cache_first_wait_seconds: + "Maximum seconds to wait for a rate-limited account in cache_first mode before switching.", + failure_ttl_seconds: + "Time in seconds before a failed account is eligible for retry.", + request_jitter_max_ms: + "Maximum random jitter in milliseconds added to outgoing requests to avoid thundering herd.", + soft_quota_threshold_percent: + "Percentage of quota usage that triggers soft quota warnings and preemptive account switching.", + quota_refresh_interval_minutes: + "Interval in minutes between quota usage checks. Set to 0 to disable periodic checks.", + soft_quota_cache_ttl_minutes: + "TTL for cached soft quota data. 'auto' (default) calculates from refresh interval, or set a fixed number of minutes.", }; const signatureCacheDescriptions: Record = {