- [Gemini 4 Argon Dedicated Quota Bar, On-Demand Display & Circuit Breaker Anti-Penetration Isolation]:
- Frontend On-Demand Full-Width Quota Bar: Tailored to Google's flagship reasoning model Gemini 4 Argon with independent quota calculation. Added a dedicated full-width capsule bar across Account Cards, Table View, Current Account, and Quota Details dialogs; adopts strictly data-driven on-demand rendering (displaying only for accounts actually authorized or possessing Argon quota) and removes crowding alert icons to ensure unobstructed third-party model icons.
- Backend Quota Aggregation & Data Flow Isolation: Enforced 3-way mutually exclusive isolation in
quota.rsbetweenis_argon, standardgemini, andclaude_or_gpt, completely preventing Argon independent bucket metrics from cross-contaminating standard Gemini 5H sliding or weekly quota pools and vice-versa. - Tier Variant Normalization & Precision Circuit Breaking: In
model_mapping.rs, normalized allgemini-4-argon-*variants (high/medium/low/thinking) to the standard bucket ID"gemini-4-argon". Under upstream 429 or quota depletion, locks exclusively the Argon model to its weekly reset time while prohibiting account-level lockouts, ensuring standard Gemini 3 and Claude models remain healthy and dispatchable.
- [/v1/models Dynamic Capabilities & Metadata Pass-through with Bare Model Inheritance] (Fixes #3677):
- Full Model Capabilities Metadata Exposure (ModelListingMeta): Resolved an issue where downstream aggregation gateways (e.g. One API, New API) and clients could not discover model capabilities. Directly surfaces upstream capability attributes from in-memory account quota data across
/v1/modelsand/v1/models/:model(OpenAI, Responses, and Claude endpoints), includingdisplay_name,supports_images,supports_thinking,thinking_budget,recommended,max_tokens,max_output_tokens, andsupported_mime_types. (Fixes #3677) - Automated Capability Inheritance for Derived Bare Models: When upstream accounts only report tiered variants (e.g.
gemini-3.7-flash-high), the gateway automatically derives the bare model (gemini-3.7-flash) while inheriting all capability flags from the tier variant and sanitizing display name parentheticals, ensuring standard bare model names never lose image or thinking support. (Fixes #3677) - In-Memory Caching & Backward Compatibility: Model metadata is cached in-memory during account loading and quota refreshes with zero recurring disk I/O; all capability fields are optional with null-skipping, maintaining 100% backward compatibility with legacy account configurations. (Fixes #3677)
- Full Model Capabilities Metadata Exposure (ModelListingMeta): Resolved an issue where downstream aggregation gateways (e.g. One API, New API) and clients could not discover model capabilities. Directly surfaces upstream capability attributes from in-memory account quota data across
- [In-App Model Connectivity Probe, Account Pool Dispatch & Request Waterfall Integration] (Ref #3678):
- Out-of-the-Box In-App Model Probing: Introduced an instant connectivity probe in the "Supported Models & Integration" table. Users can verify model availability and latency with a single click without configuring third-party clients or curl scripts; supports batch testing ("⚡️ Probe All") with cancellation. (Ref #3678)
- Dual Mode: Smart Pool Auto-Dispatch & Targeted Account Selection: Defaults to "🤖 Auto Dispatch (Pool)" which filters out disabled accounts and prioritizes healthy accounts with sufficient quota; supports selecting a specific account via the header dropdown for granular diagnosis. (Ref #3678)
- Integrated with SQLite Traffic Logs & Endpoint Waterfall: Each probe request is saved as a standard
warmupprotocol entry in SQLite logs. Clicking status badges (e.g.🟢 280ms,🟡 429 Limited,🔴 Retired) opens the full request detail modal, displaying upstream endpoint attempt waterfalls (Prod / Daily / Sandbox latency), TTFT stage breakdowns, and complete headers/payloads. (Ref #3678) - Non-Intrusive IPC Architecture & Full 12-Language i18n: Powered by clean Tauri IPC commands without bypassing CSP or CORS rules; delivers a refined table UI and synchronizes translations across all 12 supported languages. (Ref #3678)
- [12s Upstream Watchdog, Account Status Sync Fix & Claude Code Support] (PR #3680, Fixes #3506, Ref #3525, Ref #3634, Ref #3666, Thanks to @cubelikeplayDaniel):
- Candidate Endpoint 12s Streaming Watchdog Timeout: Introduced a 12-second watchdog timeout (
tokio::time::timeout) on candidate endpoint handshakes (send().await) when fallback endpoints are available. Prevents silent 56-second stalls on unresponsive upstream endpoints by promptly failing over to the next candidate; extendedEndpointHealthTrackerfailure cooldown to 300 seconds (5 minutes) to avoid premature reconnection to degraded endpoints. (PR #3680, Thanks to @cubelikeplayDaniel) - Account Entity Authority & Index Drift Fix: Established account entity files as the authoritative source of truth for enabled/disabled states, fixing issues where index drift in
accounts.jsoncould erroneously disable healthy accounts and automatically self-healing index flags upon reload. (PR #3680, Thanks to @cubelikeplayDaniel) - Claude Code 2.1.300+ Compatibility & 1M Context Alias Support: Updated
canonicalize_claude_client_model_idto strip square-bracket context window suffixes (e.g.[1m],[200k]), seamlessly matching custom and built-in model mappings; extracted top-leveleffortparameter for pipeline thinking budget calculation and merged clientanthropic-betaheaders. (PR #3680, Thanks to @cubelikeplayDaniel)
- Candidate Endpoint 12s Streaming Watchdog Timeout: Introduced a 12-second watchdog timeout (
- [Deeply Nested Tool Schema Recursion Cap Lift & Bare Array Fallback Fix] (Fixes #3682):
- Recursion Depth Cap Decoupled & Raised (MAX_RECURSION_DEPTH = 64): Resolved an issue where deeply nested tool schemas (e.g. recursive
childrenarrays in mindmap generators) exceeding depth 10 skipped fallback sanitization inclean_json_schema_recursive, forwarding bare arrays (withoutitems) upstream and triggering400 INVALID_ARGUMENT: missing field.. Raised the recursion cap from 10 to 64, seamlessly supporting 30+ levels of tree nesting. (Fixes #3682) - Eliminate Erroneous Schema-Flatten Warnings: Decoupled
$refexpansion from structural cleaning limits and guarded recursion warnings to only fire when an unexpanded$refis present, eliminating spuriousWARN [Schema-Flatten] Max recursion depth reachedlog spam on pure nested schemas. (Fixes #3682) - Iterative Fail-Safe Compliance Fallback: Implemented an iterative heap-based
apply_minimal_failsafenormalizer that guarantees child arrays receive fallbackitems: {"type": "string"}and objects receive appropriate types even when hitting extreme recursion thresholds, avoiding call stack overflow while preventing non-compliant Protobuf payloads from reaching Gemini. (Fixes #3682)
- Recursion Depth Cap Decoupled & Raised (MAX_RECURSION_DEPTH = 64): Resolved an issue where deeply nested tool schemas (e.g. recursive
- [Official Hub Fingerprint Alignment, Remote Manifest Dynamic Detection & User Overrides] (Ref #3665):
- Align with Official Hub 2.23.1 & CL 998881661: Upgraded official upstream User-Agent headers from outdated 2.17.0 to the latest official Hub version
2.23.1and Piper Monorepo changelistcl=998881661(antigravity/hub/2.23.1 (aidev_client; os_type=darwin; arch=arm64; cl=998881661)), preventing rejection or 429 anomalies caused by obsolete client identification or mistakenly embedding the gateway's own release version. (Ref #3665) - 4-Tier Adaptive Resolution (Custom > Remote Manifest > Local Installation > Baseline Fallback): Added dynamic
hub_versionmodule supporting zero-restart fetching of the latest Hub version directly from the official Cloud Run updater manifest, automatically inspecting local Antigravity.app installation metadata, and gracefully falling back to built-in baseline constants if offline or uninstalled. (Ref #3665) - Visual Hub Fingerprint Card & Granular Customization: Introduced an "Official Hub Request Fingerprint" card under Settings -> Advanced displaying real-time User-Agent strings and active resolution sources (Custom, Remote, Local, Baseline). Equipped with a "🔄 Dynamic Probe" button, one-click clipboard copy, and granular version/CL override inputs persisted in configuration. (Ref #3665)
- Align with Official Hub 2.23.1 & CL 998881661: Upgraded official upstream User-Agent headers from outdated 2.17.0 to the latest official Hub version
- [Bidirectional Tool Call/Response Self-Healing & Orphan unknown Fallback Protection] (Fixes #3679):
- Pipeline-Grade Tool Name Topology Self-Healing: Resolved an issue where client sliding window truncation, formatting drift, or missing adapter mappings resulted in undeclared
'unknown'tool names in forwarded requests, triggering fatal upstream Gemini 400 Bad Request errors. Built a session-wideid -> namebidirectional topology index in the inbound pipeline that automatically heals missing or'unknown'tool response names from canonicalized tool call IDs and preceding turns. (Fixes #3679) - Smooth Fallback for Orphan Unknown Tool Responses: When context is completely truncated and tool responses cannot be associated with any declared tool call, safely degrades the orphan response into a structured plain text part (
[Tool Output]: ...), preserving critical tool execution results for the model while eliminating fatal upstream 400 rejection. (Fixes #3679) - OpenAI & Responses Adapter Reverse-Lookup Hardening: Enhanced Chat Completions mapping to look back across multiple preceding turns (skipping intermediate thinking/text blocks) to locate matching tool call IDs, bridged normalized ID differences, and inferred tool names when only a single tool is declared; strengthened Responses API to extract nested
function.nameproperties. (Fixes #3679)
- Pipeline-Grade Tool Name Topology Self-Healing: Resolved an issue where client sliding window truncation, formatting drift, or missing adapter mappings resulted in undeclared
- [Dedicated User Token Usage Analytics & Cyber Cockpit User Rankings] (Fixes #3676):
- Granular Visual Analytics for Individual Tokens (UserTokenStatsModal): Addressed the limitation where global Token Statistics focused solely on upstream Google accounts and models without key-level drilling. Users can now click the usage cell or the dedicated "📊 Stats" button in the "User Tokens" table to open a detailed usage analytics modal. (Fixes #3676)
- Usage Trend Area Chart & Key KPI Cards: Supports switching across 24h (hourly resolution), 7 Days (daily resolution), 30 Days, and All-time spans. Renders an interactive Recharts area chart distinguishing input vs. output tokens alongside 4 core KPI cards: Total Tokens, Total Requests (with success rate), Avg. Tokens/Request, and Bound Client IPs. (Fixes #3676)
- Model Breakdown & Client IP Attribution: Aggregates token consumption, percentage share, and request counts by model; surfaces active client IPs with invocation frequencies, recent activity timestamps, and User-Agent headers. (Fixes #3676)
- Cyber Cockpit User Rankings & Instant Drill-Down: Added a 3rd "Users" tab to the right-side ranking panel in the Cyber Cockpit View alongside "Accounts" and "Models". Provides a streamlined single-line tab switcher ("Accounts" | "Models" | "Users"), displays top active user token consumption with relative progress bars and percentages, and opens the detailed usage modal directly upon clicking any item. (Fixes #3676)
- Optimized Backend Aggregations & Headless API Parity: Leverages indexed
token_usage_logswith dedicatedget_user_token_statsandget_user_tokens_rankingTauri commands alongside/api/user-tokens/:id/statsand/api/user-tokens/rankingadmin endpoints, maintaining strict feature parity across desktop and headless environments. (Fixes #3676) - Layout Anti-Wrapping Hardening & Full 12-Language i18n: Fixed layout wrapping issues for lengthy usernames, status badges, and segmented time pills; delivered complete localized strings across all 12 supported languages (zh, zh-TW, en, ja, ko, es, ru, ar, vi, tr, pt, my). (Fixes #3676)
- [Gemini 4 Argon 独立配额展示、按需渲染与后端熔断防穿透隔离]:
- 前端按需全宽独立配额条: 针对 Google 旗舰推理模型 Gemini 4 Argon 独立的配额计算机制,在账号卡片、表格视图、当前主账号及配额详情窗口中,新增专属于 Argon 的全宽配额条;采用数据驱动(Data-driven)按需渲染,仅对真实具备 Argon 配额或授权的账号渲染展示,移除了挤占空间的告警图标,确保第三方模型图标与 Argon 图标整洁互不遮挡。
- 后端配额聚合与数据流隔离: 在
quota.rs中将is_argon与普通gemini和claude_or_gpt实施严格的三路互斥隔离,防止 Argon 独立桶数据覆盖或污染普通 Gemini 的 5H 滚动桶或周配额,反之亦然。 - 档位变体归一化防穿透与精准熔断: 在
model_mapping.rs的normalize_to_standard_id中将gemini-4-argon-*全系列档位变体(high/medium/low/thinking)统一归一化为基底 ID"gemini-4-argon",并在上游 429 或配额耗尽时精准锁定该模型至周重置时间;杜绝因变体未对齐导致的熔断穿透击穿,且严禁触发账号级锁定,确保账号旗下的普通 Gemini 3 与 Claude 模型不受波及、健康可调度。
- [/v1/models 全面透出动态模型能力元数据与派生裸模型元数据继承] (Fixes #3677):
- 透出模型能力元数据 (ModelListingMeta): 解决下游聚合网关(如 One API、New API)与第三方客户端无法感知模型能力的问题。在
/v1/models、/v1/models/:model(OpenAI / Responses / Claude 端点)中,直接从账号动态 Quota 缓存中透出完整的上游标称能力字段,包括display_name、supports_images、supports_thinking、thinking_budget、recommended、max_tokens、max_output_tokens及supported_mime_types。 (Fixes #3677) - 派生裸模型自动继承能力元数据: 当上游账号仅下发分档变体(如
gemini-3.7-flash-high)时,网关在自动派生去后缀裸模型(gemini-3.7-flash)的同时,自动继承对应档位的能力元数据并智能清洗展示名括号后缀,彻底杜绝常用裸模型丢失识图与思考能力的问题。 (Fixes #3677) - 全链路内存缓存与纯可选向后兼容: 账号模型元数据在加载和刷新时直接常驻内存,请求时零重复磁盘 I/O;所有扩展字段全可选且空值自动跳过,对旧版账号文件 100% 健壮兼容。 (Fixes #3677)
- 透出模型能力元数据 (ModelListingMeta): 解决下游聚合网关(如 One API、New API)与第三方客户端无法感知模型能力的问题。在
- [支持模型快速测活、号池自调度与真实流量端点瀑布流联动] (Ref #3678):
- 应用内开箱即用模型连通性测活: 在「支持模型与集成」表格中引入即时测活功能,用户无需配置外部客户端或发送第三方 curl 测试,即可直接一键快速验证模型连通性与可用性;支持「⚡️ 批量测活」与随时中断。 (Ref #3678)
- 智能号池自调度与指定账号双模式: 默认采用「🤖 自动调度 (反代号池)」,自动过滤禁用与停用账号并优先选取健康且配额充足的账号;同时支持在顶部下拉框中指定特定账号进行针对性连通性诊断。 (Ref #3678)
- 打通真实流量日志与端点瀑布流明细: 每次测活均作为标准预热协议(
warmup)记录至 SQLite 流量日志;点击状态结果胶囊(如正常🟢 280ms、🟡 429 限流、🔴 已退役)可直接无缝呼出请求详情弹窗,完整查看上游端点切换瀑布流(Prod / Daily / Sandbox 尝试耗时)、流式分段诊断、请求响应头与完整报文。 (Ref #3678) - 无入侵 IPC 架构与多语言全量覆盖: 纯原生 Tauri IPC 命令驱动,彻底杜绝破坏 CSP 或 CORS 的前端直连缺陷;重塑精简高质感表格排版,并同步覆盖全量 12 种多国语言。 (Ref #3678)
- [上游端点 12s 看门狗超时、账号状态同步修复与 Claude Code 适配] (PR #3680, Fixes #3506, Ref #3525, Ref #3634, Ref #3666, Thanks to @cubelikeplayDaniel):
- 候选端点 12 秒流式握手看门狗超时: 当存在备用候选端点时,为上游建联握手引入 12 秒看门狗超时(
tokio::time::timeout)。当上游故障端点无响应时快速熔断切换至下一端点,避免长连接静默挂起 56 秒;同时将EndpointHealthTracker故障冷却观察期延长至 300 秒(5 分钟),防止故障节点过早复活重复踩坑。 (PR #3680, Thanks to @cubelikeplayDaniel) - 修复账号索引与实体文件状态不一致问题: 确立账号实体文件为启停状态的权威来源,解决
accounts.json索引与实体文件状态漂移导致健康账号被误判停用的隐患,并在列表刷新与重新加载时自动修复索引。 (PR #3680, Thanks to @cubelikeplayDaniel) - Claude Code 2.1.300+ 深度兼容与 1M 上下文别名适配: 在
canonicalize_claude_client_model_id中支持自动剥离[1m]、[200k]等方括号上下文后缀(如claude-3-7-sonnet-20250219[1m]),无缝对接下游内置与自定义模型映射规则;提取并透传客户端顶层effort参数至 pipeline 思考逻辑,并完整合并透传客户端全量anthropic-beta请求头。 (PR #3680, Thanks to @cubelikeplayDaniel)
- 候选端点 12 秒流式握手看门狗超时: 当存在备用候选端点时,为上游建联握手引入 12 秒看门狗超时(
- [深度嵌套工具 Schema 递归上限解耦提升与裸数组兜底修复] (Fixes #3682):
- 递归深度上限提升与解耦 (MAX_RECURSION_DEPTH = 64): 解决思维导图等深度嵌套工具 Schema 在深度超过 10 时因
clean_json_schema_recursive提前返回跳过兜底清洗,导致裸数组(无items)原样透传上游引发400 INVALID_ARGUMENT: missing field.的缺陷;将递归深度上限由 10 提升至 64,轻松支持 30+ 层树形结构。 (Fixes #3682) - 消除无 $ref 结构误报 Schema-Flatten 告警: 解耦
$ref展开上限与清洗逻辑,仅当节点包含未展开$ref且超限时才触发降级与告警,彻底根除纯树形嵌套结构在日志中频繁误刷WARN [Schema-Flatten] Max recursion depth reached的问题。 (Fixes #3682) - 引入基于显式堆栈的 Fail-safe 合规兜底: 新增迭代式
apply_minimal_failsafe,在达到极限深度退出递归时对子树执行非递归保底修复,确保所有type: "array"节点均自动补齐items: {"type": "string"}、规范化对象type与属性,杜绝调用栈溢出风险并彻底杜绝非法 Protobuf 载荷上送。 (Fixes #3682)
- 递归深度上限提升与解耦 (MAX_RECURSION_DEPTH = 64): 解决思维导图等深度嵌套工具 Schema 在深度超过 10 时因
- [官方 Hub 指纹对齐、远程更新源动态探测与版本号自定义覆盖] (Ref #3665):
- 升级对齐官方最新 Hub 指纹: 将官方上游请求头 User-Agent 从过期的 2.17.0 升级对齐至最新官方 Hub 版本
2.23.1及 Piper Monorepo 构建提交编号cl=998881661(antigravity/hub/2.23.1 (aidev_client; os_type=darwin; arch=arm64; cl=998881661)),彻底根除因客户端版本过旧或错误注入自身应用版本号(4.9.8-beta.x)被上游识别拦截的隐患。 (Ref #3665) - 四级自适应解析机制 (自定义 > 远程更新源 > 本地安装 > 内置基线): 新增
hub_version动态探测模块,支持无需重启直连官方 Cloud Run 自动更新 Manifest 实时获取最新版本号;自动探测本机安装的官方 Antigravity 桌面端应用版本;当上游无网络或未安装时平滑降级至内置基线。 (Ref #3665) - UI 直观展示与用户自主覆写支持: 在「设置 - 高级」中新增「官方 Hub 请求头指纹」卡片,实时展示当前生效的完整 User-Agent 与解析来源(自定义 / 远程更新源 / 本地安装 / 内置基线),支持「🔄 动态探测」一键刷新与复制,并提供版本号与 CL 构建号自定义输入框与配置持久化,彻底赋予用户主动掌控权。 (Ref #3665)
- 升级对齐官方最新 Hub 指纹: 将官方上游请求头 User-Agent 从过期的 2.17.0 升级对齐至最新官方 Hub 版本
- [工具调用与回执名称双向自愈与非法 unknown 降级防护] (Fixes #3679):
- Pipeline 级工具名称拓扑自愈: 彻底解决客户端因滑动窗口截断、格式漂移或 Adapter 解析缺失导致转出报文中出现未声明工具名
'unknown',引发上游 Gemini 400 校验异常中断任务的缺陷。在入站流水线中建立全会话id -> name双向拓扑索引,自动基于规范化 ID 纠正回执中缺失或为'unknown'的函数名,并在紧邻调用中自动继承。 (Fixes #3679) - 孤儿非法回执平滑降级与上游 400 熔断: 针对上下文彻底断裂、无法关联合法工具调用的孤儿回执,安全平滑降级为普通文本 Part,在完好保留工具执行结果供模型阅读的同时,彻底杜绝非法
functionResponse上送上游触发 400 报错。 (Fixes #3679) - OpenAI 与 Responses 适配层工具名称反查增强: 在 Chat Completions 适配器中支持跳过中间思考/纯文本消息多轮前溯匹配工具调用,兼容规范化 ID 差异,并在单一声明工具场景下智能推断;在 Responses API 中增强对
function.name等嵌套层级字段的健壮提取。 (Fixes #3679)
- Pipeline 级工具名称拓扑自愈: 彻底解决客户端因滑动窗口截断、格式漂移或 Adapter 解析缺失导致转出报文中出现未声明工具名
- [用户 Token 专属用量分析大屏与赛博大盘用户排行榜] (Fixes #3676):
- 单 Token 独立可视化分析大屏 (UserTokenStatsModal): 解决全局 Token 统计聚焦于上游 Google 账号与模型、无法按特定用户 API Key 进行下钻分析的痛点。在「用户 Token」表格中点击用量胶囊或操作栏的「📊 统计」按钮,即可直观呼出宽幅用量分析弹窗。 (Fixes #3676)
- 时间走势面积图与核心 KPI 指标卡: 支持自由切换「24小时 (小时粒度)」、「近7天 (日粒度)」、「近30天」及「全部」四档时间跨度,实时渲染输入 Token 与输出 Token 的时序面积走势图;联动汇总总 Token 消耗、总请求数、请求成功率、平均每请求吞吐及活跃客户端 IP 数量。 (Fixes #3676)
- 模型消耗占比与活跃客户端 IP 溯源: 自动按模型分类统计该 Key 的 Tokens 消耗绝对值、占比百分比及调用次数;同时联动 IP 绑定表列出最近活跃客户端 IP、调用频次、最近活动时间戳与 User-Agent 标头。 (Fixes #3676)
- 赛博大盘用户排行榜 (Cyber Cockpit View) 与无缝下钻: 在全局「Token 消费统计 - 赛博大盘」右侧监控池新增「用户排行」第三视图 Tab,与「账号排查」、「模型排行」平级自由切换。直观呈现活跃用户 Key 消耗排行、相对进度条、总额与占比,并支持直接点击任一条目无缝弹出该用户 Token 的专属用量分析大屏。 (Fixes #3676)
- 后端秒级聚合与 Headless/API 契约对齐: 依托
token_usage_logs现有索引结构,新增高效的get_user_token_stats和get_user_tokens_rankingTauri 命令及/api/user-tokens/:id/stats、/api/user-tokens/rankingAdmin Web API,完全保持 Headless / CLI / GUI 功能对等。 (Fixes #3676) - 全链路布局防折叠优化与 12 国语言覆盖: 修复超长用户名截断(
truncate)、状态徽章与时间药丸文字挤压折行问题;全量补齐简体中文、繁体中文、英语、日语、韩语、西班牙语、俄语、阿拉伯语、越南语、土耳其语、葡萄牙语及马来语等全部 12 种语言翻译。 (Fixes #3676)
What's Changed
- fix(proxy): 修复请求级429过早退出缺陷、统一上游Prod优先级并适配Claude Code 1M方括号 (Fixes #3506, Ref #3525, Ref #3634, Ref #3666) by @cubelikeplayDaniel in #3680
Full Changelog: v4.9.8-beta.5...v4.9.8-beta.6