- [Eliminate Ineffective Prod Endpoint & Extend Streaming First-Chunk Watchdog to 120s] (PR #3691, Fixes #3506, Ref #3525, Thanks to @EricZhou05):
- Eliminate 100% 429-Yielding Prod Public Endpoint: Empirical multi-scale benchmarks demonstrated that the public Prod endpoint (
cloudcode-pa.googleapis.com) unconditionally returns429 RESOURCE_EXHAUSTEDwithin ~1s across all context window sizes, acting as an invalid fallback that triggers false-positive account rate-limiting and 503 error loops. Completely removed Prod fromV1_INTERNAL_BASE_URL_FALLBACKS, retaining only official native primaryDailyand verified backupSandboxendpoints to sever the fatal failover loop. (PR #3691, Ref #3525, Thanks to @EricZhou05) - Recalibrate Streaming Watchdog First-Chunk Timeout to 120s Baseline: Resolved a flaw where the previous adaptive watchdog formula
max(15, body_len / 256KB + 15)accounted only for network transmission bandwidth while overlooking long-context and Thinking reasoning time-to-first-token (TTFT ~35s), prematurely aborting requests at 16s. Streaming generation (streamGenerateContent) first-chunk timeout is now relaxed to a 120-second baseline (max(120, body_len / 64KB + 120)), fully accommodating model reasoning and cold-cache preheating while preventing false-positive 429/503 cutoffs; lightweight non-streaming requests retain the 15-second fast-probing timeout. (PR #3691, Fixes #3506, Thanks to @EricZhou05)
- Eliminate 100% 429-Yielding Prod Public Endpoint: Empirical multi-scale benchmarks demonstrated that the public Prod endpoint (
- [Preserve Multi-Turn Message Roles for Responses-Style Chat Completions] (PR #3672, Fixes #3671, Thanks to @blackdm666):
- Preserve System/User/Assistant Roles in Array Inputs: Resolved an issue where
/v1/chat/completionsreceiving Responses-style payloads (instructions/inputwithoutmessages) collapsed arrayinputitems into a single user text viato_string(), destroying role boundaries and causing Gemini to echo conversation history rather than answering the latest turn. Reusedconvert_codex_to_openai_requestto accurately restore structured message roles per turn while preserving string input compatibility. (PR #3672, Fixes #3671, Thanks to @blackdm666)
- Preserve System/User/Assistant Roles in Array Inputs: Resolved an issue where
- [Intelligent 403 State Identification, Upstream Action URL Extraction & Closed-Loop Self-Healing] (Ref #3630, Ref #3684):
- Full 403 Body Capture & Action URL Extraction (validation_url / appeal_url): Eliminated premature discarding of 403 HTTP response bodies in
modules/quota.rs. Full Google RPC error payload details are now parsed viaextract_action_urlto accurately extractvalidation_url(human/captcha verification links) andappeal_url(Terms of Service appeal links) fromdetails.metadataand persist them into the account model. Integrated with frontendAccountErrorDialogto immediately present actionable buttons ("Verify Now", "Copy Verification URL", "Submit Appeal"), completely replacing vague and opaque 403 error states. - Decouple Temporary Verification (VALIDATION_REQUIRED) from Permanent Ban: Refactored gateway handlers across Gemini, Claude, and OpenAI (
handlers/gemini.rs,handlers/claude.rs,handlers/openai.rs) and warmup probes to make temporary validation and permanent ban (set_forbidden) mutually exclusive. EncounteringVALIDATION_REQUIREDnow places the account into a 10-minute temporary observation window while retaining the verification URL, eliminating accidental permanentproxy_disabled = truedeadlocks for temporary verification prompts. - Automatic Deadlock Clearing & Closed-Loop Recovery on Successful Probe: Redesigned
update_account_quotaandclear_validation_blockedso that when an account completes verification externally (e.g. via the official IDE or web browser) and subsequent quota probing succeeds (is_forbidden == false), the system automatically clears theproxy_disabledflag and resets stale 403 error reasons. Dispatchestrigger_account_reloadand broadcasts updated state to the frontend, restoring recovered accounts back into the active proxy pool seamlessly without manual user intervention.
- Full 403 Body Capture & Action URL Extraction (validation_url / appeal_url): Eliminated premature discarding of 403 HTTP response bodies in
- [Classic Auto Hot-Switch on Depleted Quota, Dual-Pool Monitoring & Legacy Sync Cleanup] (Ref #3509):
- Automatic Seamless Hot-Switching for Antigravity Classic: Integrated an auto-switch engine directly into the background quota inspection pipeline (
refresh_all_quotas_internal). When Antigravity Classic is running and the active account's quota falls below the configured threshold, the engine automatically selects the healthiest available account from the pool based on threshold satisfaction, tier priority (Pro/Ultra > Free), highest remaining quota, and LRU anti-oscillation. Seamlessly restarts the backendlanguage_servervia supervisor within 2 seconds without restarting the main IDE window, guarded by a 120-second cooldown lock and desktop notifications. (Ref #3509) - Streamlined Dual Quota Pool Monitoring & Threshold Control: Eliminated cluttered per-model selection tags in favor of intuitive dual-pool cards aligned with the dashboard — "Gemini Pool (Pro / Flash / Image)" and "Third-Party Models (Claude 3.7 / 3.5 / GPT)", with customizable trigger thresholds from 0% to 99%.
- Removal of Redundant Legacy Account Sync & UI Streamlining: Removed the confusing legacy "Auto Sync Current Account" card from Account Settings and removed its unused background interval timer, keeping the settings interface clean and focused.
- Full 12-Language Localization: Synchronized complete translations across all 12 supported languages including Chinese (Simplified & Traditional), English, Korean, Japanese, Russian, Spanish, Portuguese, Turkish, Vietnamese, Arabic, and Malay.
- Automatic Seamless Hot-Switching for Antigravity Classic: Integrated an auto-switch engine directly into the background quota inspection pipeline (
- [Local Account Scanning Alignment & Legacy Backup Removal]:
- Streamlined Removal of Legacy V1 Backup & UI Simplification: Completely eliminated the legacy V1 (
~/.antigravity-agent) import path and divider in the Add Account dialog, focusing the interface cleanly into "Auto-Scan Local Accounts" and "Import Custom DB" with synchronized multi-language typography and improved spatial efficiency. - Aggregated Classic & IDE Database Scanning (state.vscdb): Introduced
db::get_all_antigravity_db_paths()to remove the hardcoded restriction that previously limited scanning to ClassicAntigravity. Now concurrently aggregates all candidate databases across both Classic Antigravity and Antigravity IDE (includingantigravity-idevariants), resolving the issue where accounts logged in via the IDE were silently overlooked. - Independent Concurrent Antigravity CLI (agy) Credential Detection: Introduced
read_antigravity_cli_credentials()to bypass Keychain short-circuiting that previously masked CLI tokens. Independently scans Antigravity CLI credentials and backups (~/.gemini/antigravity-cli/antigravity-oauth-token*), strictly targeting Antigravity tokens for automated multi-source deduplication and onboarding.
- Streamlined Removal of Legacy V1 Backup & UI Simplification: Completely eliminated the legacy V1 (
- [Independent Active Account Tracking & Contextual Multi-Client Badges for Classic, IDE & CLI (agy)] (Ref #3630, Ref #3686):
- Independent Multi-Client Active Account Ground-Truth Detection: Added
detect_active_clients_statusandget_active_clients_statusTauri commands to accurately determine the live logged-in account for each client environment independently — Antigravity Classic (Keychain / DB), Antigravity IDE (state.vscdb), and Antigravity CLI (agycredentials & Keyring). Resolves status collision and ambiguity caused by a single globalcurrent_account_id. - Persistent Multi-Target Switch Tracking: Extended
AccountIndexwithcurrent_classic_account_id,current_ide_account_id, andcurrent_agy_account_idfields, persisting exact client-specific active assignments whenever an account is switched for a targeted client. - Contextual Multi-Client Badges & Row Highlighting: Implemented distinct client badges (
[Classic],[IDE],[CLI]) across both Card (AccountCard) and Table (AccountTable) views. Supports multi-badge combinations when an account is active in multiple clients, and highlights borders/rows with the active theme tint for superior readability across multi-client workflows. - Complete Multi-Language Localization: Synchronized badges and explanatory hover tooltips across English, Simplified Chinese, and Traditional Chinese.
- Independent Multi-Client Active Account Ground-Truth Detection: Added
- [剔除不可用 Prod 端点并放宽流式首包看门狗超时至 120s] (PR #3691, Fixes #3506, Ref #3525, Thanks to @EricZhou05):
- 剔除 100% 报 429 的 Prod 生产公共端点: 经全规模对照实测,Prod 生产端点(
cloudcode-pa.googleapis.com)对该接口全上下文规模均在 1 秒左右必然返回429 RESOURCE_EXHAUSTED,无法作为有效 fallback,切过去只会引发假阳性限流并触发账号禁用死循环。在V1_INTERNAL_BASE_URL_FALLBACKS中彻底剔除 Prod 端点,仅保留官方原生主力Daily与实测可用的备用Sandbox双端点容灾,切断流向必死 Prod 的自杀通道。(PR #3691, Ref #3525, Thanks to @EricZhou05) - 校准流式接口自适应防假死首包超时门槛至 120 秒: 修复早期看门狗超时公式
max(15, body_len / 256KB + 15)仅考虑网络带宽而忽略「大模型长上下文 + Thinking 深度思考首字生成 (TTFT)」导致 16 秒误判假死掐断的问题。将流式接口(streamGenerateContent)首包超时保底放宽至 120 秒(max(120, body_len / 64KB + 120)),充分保障大模型冷缓存预热与思考链推理时间,杜绝长会话被反代误杀切入 429 与 503 假阳性;非流式普通请求维持 15 秒快速探活回退。(PR #3691, Fixes #3506, Thanks to @EricZhou05)
- 剔除 100% 报 429 的 Prod 生产公共端点: 经全规模对照实测,Prod 生产端点(
- [Chat Completions 对齐 Responses 格式多轮角色保留与结构化转换] (PR #3672, Fixes #3671, Thanks to @blackdm666):
- Responses 格式数组 input 完整保留多轮对话角色: 解决
/v1/chat/completions接收仅带instructions/input而无messages的 Responses 格式请求时,原实现将数组形式的input强行to_string()为单条 user 文本导致丢失 system / user / assistant 角色边界、引发 Gemini 上游把整段历史当新问题重答的缺陷。改为无缝复用convert_codex_to_openai_request结构化转换器,按条目精确还原各轮次角色,并兼容字符串格式 input 输入。(PR #3672, Fixes #3671, Thanks to @blackdm666)
- Responses 格式数组 input 完整保留多轮对话角色: 解决
- [403 状态智能识别、上游操作指引提取与全自动闭环自愈] (Ref #3630, Ref #3684):
- 403 报文体全量捕获与动作链接提取 (validation_url / appeal_url): 在配额探测模块(
modules/quota.rs)中根除 403 立即丢弃响应体的缺陷;全量读取 Google RPC 错误详情报文,通过新增的extract_action_url精准解析details.metadata中的validation_url(人机/安全验证链接)与appeal_url(服务条款申诉链接)并持久化至账号模型。配合前端AccountErrorDialog,即时点亮「点击去验证」、「复制验证链接」或「前往申诉」交互按钮,彻底告别空洞抽象的单一 403 报错状态。 - 临时人机验证 (VALIDATION_REQUIRED) 与永久封禁严格解耦: 在 Gemini、Claude 与 OpenAI 协议网关(
handlers/gemini.rs、handlers/claude.rs、handlers/openai.rs)及预热检测中,将临时人机验证与永久封禁(set_forbidden)改造为严格互斥逻辑。发生VALIDATION_REQUIRED时仅进入 10 分钟观察窗口并记录验证链接,不再强行写入永久proxy_disabled = true,杜绝临时验证被误判为永久死刑。 - 配额探测成功自动解除死锁与闭环自愈: 彻底重塑
update_account_quota与clear_validation_blocked,当账号在外部(如官方 IDE 或网页端)通过验证、配额探测恢复正常(is_forbidden == false)时,自动解除proxy_disabled禁用状态并清空历史 403 错误信息;同时触发trigger_account_reload与前端状态推送,使恢复的账号无需人工干预即可全自动重归现役代理号池。
- 403 报文体全量捕获与动作链接提取 (validation_url / appeal_url): 在配额探测模块(
- [经典款配额自动无感热切换、双核算力池监控与冗余同步清理] (Ref #3509):
- 经典款配额耗尽/低于阈值全自动无感热切: 在后台配额巡检流水线(
refresh_all_quotas_internal)中接入自动热切引擎;当检测到 Antigravity 经典款当前正在运行且活动账号配额低于预设阈值时,自动在账号池中按「满足阈值门槛 + 付费等级优先 (Pro/Ultra > Free) + 可用配额更多 + LRU 防震荡」挑选最佳可用账号。通过精准终止后台language_server子进程并自动更新系统 Keyring,由内置 supervisor 在 2 秒内原地无感重启生效,并附带 120 秒冷却锁与系统桌面通知。 (Ref #3509) - 极简双核算力池监控与阈值调节: 彻底告别繁复密集的细分子模型标签,与仪表盘配额体系深度对齐,提供「Gemini 算力池 (Pro / Flash / 绘图)」与「第三方模型池 (Claude 3.7 / 3.5 / GPT)」两大核心池多选卡片;支持用户自定义 0% ~ 99% 换号触发阈值。
- 清理冗余的账号同步轮询与界面精简: 彻底移除设置页中容易引起与“自动刷新配额”混淆的历史老旧功能「自动获取当前账号」配置卡片,同步清理前端无效定时器,保持账号设置页聚焦整洁。
- 全量 12 种多国语言覆盖: 经典款自动热切相关文案完整覆盖中文(简/繁)、英文、韩文、日文、俄文、西文、葡文、土文、越文、阿文、马文等全部 12 种语言。
- 经典款配额耗尽/低于阈值全自动无感热切: 在后台配额巡检流水线(
- [本地账号扫描全链路对齐与旧版备份移除]:
- 精简移除旧版 V1 备份与界面轻量化: 在新增账号弹窗中彻底移除早期 V1 版本(
~/.antigravity-agent)冗余导入入口与分割线,将界面聚焦并精简为「自动扫描本地已登录账号」与「从自定义 DB 导入」,同步优化多语言文案与布局空间。 - 经典款与 IDE 款数据库候选全量聚合 (state.vscdb): 新增
db::get_all_antigravity_db_paths(),破除先前导入扫描仅检索经典款Antigravity的限制;支持无缝并发聚合经典款与 Antigravity IDE(含antigravity-ide变体)所有活动数据库实例,彻底解决 IDE 款已登录账号被静默漏检的问题。 - Antigravity CLI (agy) 原生凭据独立并发探测: 新增
read_antigravity_cli_credentials(),解决系统 Keyring 短路拦截导致无法检索 CLI 令牌的缺陷;独立扫描 Antigravity CLI 原生凭据与备份文件(~/.gemini/antigravity-cli/antigravity-oauth-token*),严格限定仅处理 Antigravity 生态凭据,实现多源账号自动去重全量入池。
- 精简移除旧版 V1 备份与界面轻量化: 在新增账号弹窗中彻底移除早期 V1 版本(
- [经典款、IDE 款与 CLI (agy) 三端当前账号独立追踪与情境化多端徽章] (Ref #3630, Ref #3686):
- 三端活动账号独立探测与事实对齐: 新增
detect_active_clients_status与get_active_clients_statusTauri 命令,分别精准探查 Antigravity 经典款(Keychain / DB)、Antigravity IDE (state.vscdb) 以及 Antigravity CLI (agy原生凭据与 Keyring) 三端真实的当前生效账号;告别以往单全局current_account_id互相覆盖、状态混乱与归属不明的问题。 - 持久化索引结构与多端切换记忆: 在
AccountIndex中扩展current_classic_account_id、current_ide_account_id与current_agy_account_id字段;在针对特定目标端(Classic / IDE / CLI)切换生效账号时,精准更新对应端的活动账号记录并持久化索引。 - 情境化多端徽章呈现与列表聚焦: 在卡片视图(
AccountCard)与表格视图(AccountTable)中引入专属情境化徽章([经典款]、[IDE]、[CLI]);支持同一账号被多端同时登录时直观复合展示,并对任一活动端账号赋予专属高亮边框与行背景,大幅提升多环境并行开发时的辨识度与体验。 - 全量多语言国际化支持: 覆盖简体中文、繁体中文、英文客户端徽章文案与悬浮提示说明。
- 三端活动账号独立探测与事实对齐: 新增
What's Changed
- fix(upstream): 剔除不可用 Prod 端点并放宽流式首包 Watchdog 超时至 120s (Fixes #3506, Ref #3525) by @EricZhou05 in #3691
Full Changelog: v4.9.8-beta.8...v4.9.8-beta.9