- [Upstream HTTP/2 Protocol Hardening & Stream Drop Fix] Completely remove destructive HTTP/2 PING injection, restore native Chrome 123 protocol baseline, and eliminate 10s deep-thinking disconnects (Fixes #3593):
- Root Cause Elimination for Destructive HTTP/2 PING: Protocol frame tracing confirmed that Google GFE / Cloudcode endpoints silently drop client-initiated HTTP/2 PING frames without returning PING ACKs. In v4.8.9 (PR #3571), the configured
keep_alive_timeout = 10scaused local hyper2 to unilaterally terminate the connection at exactly 10s when waiting for an ACK, throwingerror reading a body from connection (buffer_bytes=0). The destructive.http2(|mut h2| ...)configuration has been completely removed fromUpstreamClient, eliminating the local self-abort timer. - Restoration of Native Chrome 123 Behavior & L4 Keep-Alive: Strictly aligned with real Chrome 123 browser protocol behavior (browsers never send HTTP/2 PING frames at the application layer), relying on standard L4 TCP Keep-Alive (60s). Seamlessly collaborates with PR #3578's downstream SSE 3s comment heartbeats (
: ping\n\n) to prevent client-side idle timeouts without jeopardizing upstream stability. - Eliminate Connection Pool Pollution & 503 Token Pool Exhaustion: Removed idle PINGs from
keep_alive_while_idle(true)that poisoned pooled connections, resolving the failure on consecutive requests and preventing cascading account lockouts that led to503 Token pool is empty. - Deep Stress Testing Verification: Rigorously verified with long-generation benchmarks; models successfully sustained over 15.30s of initial silent thinking pauses and generated over 250KB across 125s+ with 100% connection reuse success.
- Root Cause Elimination for Destructive HTTP/2 PING: Protocol frame tracing confirmed that Google GFE / Cloudcode endpoints silently drop client-initiated HTTP/2 PING frames without returning PING ACKs. In v4.8.9 (PR #3571), the configured
- [Cross-Protocol SSE Byte-Level Line Buffering & Multibyte Splitting Defense] Eliminate Deserialization Failures & Stream Interruptions on CJK/Cyrillic/Emoji/Non-ASCII TCP Chunk Fragmentation (Fixes #3593):
- SSE Collectors Upgraded with
BytesMutLine Buffering: Refactoredclaude/collector.rs,openai/collector.rs, andgemini/collector.rs. Completely eliminated naiveString::from_utf8_lossy(&chunk).lines()chunk-by-chunk splitting in favor ofBytesMutaccumulating byte streams with strict newline (\n) slicing. - Multilingual UTF-8 Boundary Splitting Protected: When CJK (3-byte), Cyrillic/Arabic (2-byte), Emoji/special symbols (4-byte), or oversized tool outputs are fragmented across TCP MTU boundaries, legacy chunk slicing produced corrupt
\u{FFFD}replacement bytes that broke JSON parsing; the new architecture guarantees UTF-8 parsing only takes place on fully assembled lines. (Thanks to @Hubitski)
- SSE Collectors Upgraded with
- [Official Claude 5.5 Live Metadata Injection, 128k Pipeline Ceiling Lift & Dynamic Scheduling] Dynamic Capability Detection, 404/403 Circuit Breaker & Evasion:
- Authoritative Claude 5.5 Metadata Populated: Captured live traffic from Antigravity Hub to populate
official_models.jsonwith all 6 Claude 5.5 models (claude-sonnet-5-5-*andclaude-opus-5-5-*), including internal IDs (MODEL_PLACEHOLDER_M400~M405), 1M context, 128k output limit,thinkingLevel1/2/3, andvertexModelId. - Pipeline Inbound Ingress & Adapter 128k Ceiling Lifted: Replaced legacy 64k static truncation in
InboundThinkingPipelineand protocol adapters with catalog-driven resolution, granting Claude 5.5 models up to 128,000 output tokens to prevent long reasoning answers from being truncated at ingress. - Account Capability Convergence & 404/403 Graceful Rotation: Introduced
token_supports_advanced_modelto route advanced model traffic strictly to qualified accounts. Addedmark_model_unsupportedto temporarily isolate unsupported accounts for 900s on 404/403 without locking out standard models, rotating seamlessly within the pool.
- Authoritative Claude 5.5 Metadata Populated: Captured live traffic from Antigravity Hub to populate
- [Pure Data-Driven DynamicTierRouter & Available Tier Scanning] Eliminate Phantom Models & Hardcoded Fallbacks:
- Data-Driven Bare Model Derivation: Base models are dynamically discovered and derived from live upstream catalogs via suffix stripping (
["-tiered", "-high", "-medium", "-low", "-extra-low"]), eliminating static maintenance. - Removed Flash High Hardcoding with Adaptive Decision Chains: Replaced hardcoded Flash high routing with adaptive tier matching (adaptive
tiered->medium-> actual available lowest tier -> first available tier), guaranteeing non-existent tiers are never synthesized.
- Data-Driven Bare Model Derivation: Base models are dynamically discovered and derived from live upstream catalogs via suffix stripping (
- [Claude Cowork Deep Context Compaction & Decoupled Patch Utility] (PR #3580, PR #3582):
- Opt-in Deep Compaction Mechanism: Implemented opt-in deep context compaction and decoupled patching utilities aligned with official 50% thresholds and latency optimization.
- Cross-Version Lifecycle & Patch Lock Defenses: Hardened deep archive lifecycle and atomic patch locks against deadlocks; provided empirical verification across 21 official versions. (Thanks to @cubelikeplayDaniel)
- [Mini Window Account Pool Matrix & Single View Toggle] (PR #3589, PR #3591):
- Account Pool Matrix View: Introduced multi-account status matrix and single-view toggling in Mini View, supporting one-click active account switching.
- UI Visual & Interaction Enhancements: Automatically downgrade quota bars below 50% to warning colors, compacted multi-language toggle labels, and resolved GroupedSelect dropdown overflow near viewport edges. (Thanks to @EricZhou05, @zepeng-jin)
- [Cross-Platform Compatibility, Gateway Security & Tool Signature Pruning] (PR #3590):
- Cross-Platform Display Fixes: Resolved WebKit DMA-BUF compatibility on Linux KDE Wayland.
- Tool Signature Storage Governance: Enforced hard row bounds and TTL pruning on
tool_signatures.dbto prevent disk bloat; strictly isolated Classic client and IDE plugin processes and database paths. (Thanks to @cubelikeplayDaniel)
- [上游底层 HTTP/2 协议栈重构与根治假死断流] 彻底移除破坏性 HTTP/2 PING 注入,回归真实 Chrome 123 原生协议基线,终结深度思考与长上下文 10s 自杀式断流 (Fixes #3593):
- 根因溯源与彻底移除有毒 HTTP/2 PING: 深入抓包与底层协议状态机实测证实,Google GFE / Cloudcode 生产端点对客户端主动发送的 HTTP/2 PING 帧静默丢弃、100% 不回复 PING ACK。v4.8.9 (PR #3571) 配置的
keep_alive_timeout = 10s导致本地 hyper2 在思考静默期等不到 ACK 时于第 10 秒整准时在客户端本地主动杀死连接,抛出error reading a body from connection (buffer_bytes=0)。现彻底移除UpstreamClient中破坏性的.http2(|mut h2| ...)配置,拔除本地等待 ACK 的自杀定时炸弹。 - 回归 Chrome 123 原生协议行为与稳态 L4 保活: 严格对齐真实 Chrome 123 浏览器的协议行为(真实浏览器在 HTTP/2 层从不发应用层 PING),完全依赖操作系统的标准 L4 TCP Keep-Alive (60s);同时与 PR #3578 在下游 SSE 提供的 3s 纯文本注释心跳(
: ping\n\n)形成完美协同,既防止下游客户端/IDE 空闲超时,又保证上游长思考连接绝不断流。 - 消除空闲连接池污染与根除 503 Token pool is empty 雪崩: 彻底清除后台
keep_alive_while_idle(true)对连接池空闲连接乱发得不到 ACK 的 PING 所造成的连接坏死,消灭“连续请求两次就失败”的连接复用崩溃,避免网关因连接断开误触发重试熔断将可用账号锁死,彻底解决账号池雪崩问题。 - 超长任务与长思考深度压测验证: 经真实凭据长任务压测,模型在经历长达 15.30 秒的首包思考完全静默期依然稳如磐石,连续跑满 125 秒(25 万字节)大生成且多轮连接池复用 100% 成功,连接零断流。
- 根因溯源与彻底移除有毒 HTTP/2 PING: 深入抓包与底层协议状态机实测证实,Google GFE / Cloudcode 生产端点对客户端主动发送的 HTTP/2 PING 帧静默丢弃、100% 不回复 PING ACK。v4.8.9 (PR #3571) 配置的
- [三大协议 SSE 字节级行缓冲加固与多字节防撕裂] 彻底解决中文/俄语/Emoji 等非 ASCII 多字节字符与长工具输出跨 TCP Chunk 拆包导致反序列化崩溃与断流 (Fixes #3593):
- 流收集器全量升级
BytesMut字节级行缓冲区: 重构claude/collector.rs、openai/collector.rs与gemini/collector.rs。彻底废除旧版直接在单个原始数据块上调用String::from_utf8_lossy(&chunk).lines()的朴素切片逻辑,全面引入BytesMut字节流累积与\n定位切割。 - 杜绝多语言 UTF-8 跨 Chunk 撕裂: 无论是中日韩(3字节)、俄语/阿拉伯语(2字节)、Emoji/特殊符号(4字节)还是超长工具调用结果,当数据恰好落在 TCP MTU 拆包边界时,旧版切片会在边界产生无效替换符
\u{FFFD}破坏 JSON 语法;新版保证必须在接收到完整换行后才进行 UTF-8 校验与分发。 (Thanks to @Hubitski)
- 流收集器全量升级
- [官方 Claude 5.5 实机元数据全量入库、128k 解禁与动态能力调度] 动态能力探测、404/403 单模型熔断避让与换号重试:
- 官方 Claude 5.5 真实模型元数据全量入库: 依据官方实机流量首次为
official_models.json注入全部 6 款 Claude 5.5(claude-sonnet-5-5-*与claude-opus-5-5-*)权威内部代号(MODEL_PLACEHOLDER_M400~M405)、1M 上下文上限、128k 输出上限、thinkingLevel1/2/3 档位与vertexModelId。 - Pipeline 进站终审与各协议层 128k 限制解禁:
InboundThinkingPipeline终审上限保护由旧版静态截断(64k)升级为优先遵循官方目录权威设定,并为 Claude 5.5 放宽至 128,000 输出 Token,彻底解决超长生成被网关终审截断的问题。 - 未获权限 PRO 账号 404/403 单模型临时熔断与换号重试: 在协议层与
TokenManager落地mark_model_unsupported。当未灰度到 Claude 5.5 的 PRO 账号报错 404/403 时,仅对该账号隔离特定模型(900s 临时避让),绝不连坐该账号调用其他正常模型,并在账号池有富余候选时自动换号重试。
- 官方 Claude 5.5 真实模型元数据全量入库: 依据官方实机流量首次为
- [纯数据驱动的通用 DynamicTierRouter 与可用档位扫描机制] 彻底清理假模型与硬编码,对齐官方真实可用模型:
- 纯数据驱动的动态裸模型衍生: 严格以 Google 官方真实下发的可用模型为基准源,通过全自动通用后缀剥离扫描(
["-tiered", "-high", "-medium", "-low", "-extra-low"])动态派生裸模型。 - 移除 Flash 强制 High 特判,严格遵循真实存在档位自适应决策链: 重构
pick_optimal_default_tier与显式 effort 匹配防御:优先匹配自适应tiered-> 其次medium-> 再次真实存在的最低档 -> 极端保底仅取上游实际存在的首个档位,绝不凭空捏造不存在的档位导致上游报错。
- 纯数据驱动的动态裸模型衍生: 严格以 Google 官方真实下发的可用模型为基准源,通过全自动通用后缀剥离扫描(
- [Claude Cowork 深度压缩 (Deep Compact) 与原子化补丁引擎] (PR #3580, PR #3582):
- 深度上下文压缩机制: 实现 opt-in 的 Claude Cowork 深度上下文压缩机制与解耦补丁工具,对齐官方 50% 阈值与延迟优化;
- 跨版本生命周期与补丁锁安全: 健全深度归档链路与原子补丁锁,防范死锁;补齐覆盖 21 个官方版本的跨版本实测证据文档。 (Thanks to @cubelikeplayDaniel)
- [迷你窗口多账号矩阵与单账号切换视图] (PR #3589, PR #3591):
- 多账号池矩阵展示与一键切换: 迷你窗口引入账号池多账号状态矩阵展示与单账号简洁视图切换,支持点击一键切换活跃账号;
- UI 视觉与交互体验优化: 进度条低于 50% 自动降级为警示色,精简多国语言紧凑标签;修复 GroupedSelect 下拉菜单靠近视口底部时的溢出与滚动问题。 (Thanks to @EricZhou05, @zepeng-jin)
- [跨平台兼容性、网关安全与工具签名持久化治理] (PR #3590):
- 跨平台显示修复: 修复 Linux KDE Wayland 平台下 WebKit DMA-BUF 兼容性问题;
- 工具签名数据库治理: 加固工具签名数据库(
tool_signatures.db)的行数硬上限与 TTL 清理机制,防范磁盘膨胀;严格隔离 Classic 客户端与 IDE 插件的进程与数据库路径。 (Thanks to @cubelikeplayDaniel)
What's Changed
- fix(cowork): 健全深度归档链路、自适应客户端版本探测与官方 Token 估算对齐 by @cubelikeplayDaniel in #3580
- docs(cowork): 补充 Deep Compact 核心架构 RFC 与深度开发细节规范 by @cubelikeplayDaniel in #3582
- fix(ui): 修复 GroupedSelect 下拉菜单靠近视口底部时被截断与无法滚动的溢出问题 by @zepeng-jin in #3591
- fix(cowork,proxy): harden deep compact lifecycle, eliminate 503 timeouts, isolate clients and align retry strategy by @cubelikeplayDaniel in #3584
- fix(ui): sync active account on init and resolve mini view refresh deadlock by @EricZhou05 in #3589
- fix(proxy): harden pipeline schema normalization, model versioning and tool signature pruning by @cubelikeplayDaniel in #3590
- feat(ui): support account pool matrix and single view toggle in mini window by @EricZhou05 in #3592
- fix(proxy): 修复 Claude 5.5 原始 Protobuf 思考签名识别与出站格式校验 by @cubelikeplayDaniel in #3595
New Contributors
- @cubelikeplayDaniel made their first contribution in #3580
- @zepeng-jin made their first contribution in #3591
Full Changelog: v4.9.1...v4.9.3