- [Pre-Selecting Proxy Node, Auto-Binding & Strict Proxy Mode When Adding Accounts] (Fixes #4077):
- Pre-Binding Across OAuth & Refresh Token Flows: Added proxy node pre-selection in
AddAccountDialogand headless/CLIAddAccountProxyOptionspropagation across both OAuth and Refresh Token account-creation flows; binds accounts persistently (bind_account_proxy_persistent) and validates/routes initial quota probes through the chosen proxy node, while fixingmax_accountsself-rebind rejections and offline proxy pool config fallback. (Fixes #4077) - Fail-Closed Strict Proxy Mode (
strict_mode): AddedProxyPoolConfig.strict_mode(andABV_PROXY_POOL_STRICT_MODE/ANTIGRAVITY_PROXY_POOL_STRICT_MODE) with UI toggles in Proxy Pool Settings and 12-locale copy so disabled or unavailable proxy bindings fail closed instead of leaking requests over a direct IP. (Fixes #4077)
- Pre-Binding Across OAuth & Refresh Token Flows: Added proxy node pre-selection in
- [Restrict User Tokens to Specific Upstream Accounts] (Fixes #4058, PR #4059, Thanks to @dandelion-promise520, @cubelikeplayDaniel):
- Per-Token Upstream Account Scoping: Persisted
allowed_account_idsonUserTokenIdentityand enforced account allowlists across model gates,TokenManagerscheduling, OpenAI image generationJoinSettasks, and Responses WebSocket handlers, accompanied by UI account selectors and scope badges. (Fixes #4058, PR #4059, Thanks to @dandelion-promise520, @cubelikeplayDaniel)
- Per-Token Upstream Account Scoping: Persisted
- [Bounded 1M Token-Limit Retries,
/compactDeadlock Protection &count_tokensThinkingStore Alignment] (Fixes #4024):- Bounded Session-Bump Retries & Estimate Fallback: Reused
UpstreamClassification::is_input_token_limit_exceededacross all 4 protocols (Claude / Gemini / OpenAI Chat / Responses) to cap 400exceeds the maximum number of tokensbump_sessionretries to 1 same-account attempt; broadened token-limit regex parsing (including parentheseless forms and local estimate fallback guaranteeinginput > max) so Claude receives canonicalprompt is too longerrors cleanly. (Fixes #4024) - Staged
/compactPayload Trimmer &count_tokensParity: Fixed multi-block<system-reminder>masking during compaction detection and dualsession_key/store_keycache clearing; addedcompact_gemini_payload_to_budgetandcompute_reactive_compaction_budget(progressive thought/signature stripping, top-level &functionResponse.partsmedia stripping, safeuser-boundary turn pruning, and UTF-8-safe middle truncation); aligned/v1/messages/count_tokensto include in-memoryThinkingStorebackfill volume. (Fixes #4024)
- Bounded Session-Bump Retries & Estimate Fallback: Reused
- [Preserve >100MB Bodies in Monitor Middleware & Extend Multimodal Sliding Window to PDF/Media and
functionResponse.parts] (Fixes #4083):- Unified Body Ceiling Without Silent Empty-Body Drops: Unified
resolve_max_body_size()(256 MB default, honoringABV_MAX_BODY_SIZE) inserver.rs, refactoredmonitor.rsso bodies between the 100 MB log cap andmax_body_sizepass through untouched instead of being replaced withBody::empty(), and returned structured HTTP 413Payload Too LargeJSON when exceeding the limit. (Fixes #4083) - Full Multimodal Window & Estimator Coverage: Extended
apply_multimodal_sliding_window_and_limitsandestimator.rsto coverimage/*,application/pdf,audio/*, andvideo/*across both top-levelpartsandfunctionResponse.parts, recording metadata notices underfunctionResponse.response._omitted_multimodal_partswithout inserting invalid text parts intofunctionResponse.parts, and updated Multimodal Settings copy. (Fixes #4083)
- Unified Body Ceiling Without Silent Empty-Body Drops: Unified
- [Configurable Request Budget, Extended TTFT Ceiling & Unclamped Post-TTFT Stream Timeouts] (Fixes #4061, Fixes #4063, PR #4076, PR #4081, Thanks to @koeria, @zainulhasan):
- Configurable Global Budget & Opt-In Extended TTFT Ceiling: Exposed
gateway_request_budget_secsvia GUI (TimeoutSettings), config files, admin API, andANTIGRAVITY_GATEWAY_REQUEST_BUDGET_SECS, with opt-in extended TTFT headroom when the configured budget exceeds 270s. (Fixes #4061, PR #4081, Thanks to @zainulhasan) - Stop Clamping Post-TTFT Stream Timeouts: Updated
StreamLifecycleConfig::newso onlyinitial_ttft_secsis bounded by remaining admission budget, preserving configuredtransition_secsandstreaming_sliding_secsonce streaming starts after long queues or thinking pauses. (Fixes #4063, PR #4076, Thanks to @koeria)
- Configurable Global Budget & Opt-In Extended TTFT Ceiling: Exposed
- [Mitigate Linux glibc RSS Memory Bloat, Hot-Path Churn & Unbounded Rust Caches] (Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel):
- glibc Allocator Tuning & Periodic
malloc_trim: Addedmemory_stats.rsto configure Linux glibcM_ARENA_MAX=2,M_MMAP_THRESHOLD=128KiB, andM_TRIM_THRESHOLD=128KiBat startup (with env overrides) alongside periodicmalloc_trim(0), setMALLOC_ARENA_MAX=2in runtime Dockerfiles, and exposed/api/system/memoryand/api/system/memory/trimdiagnostics. (Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel) - Hot-Path Allocation Fixes & Bounded Caches: Replaced
O(N^2)SSEformat!string concatenation with in-placeString::push_str, reused a persistent bounded SQLite write connection forproxy_db::save_log, capped monitor stream response capture at 4 MiB, and enforced TTL + hard caps acrosssession_accounts,SignatureCachelayers 2–4,ThinkingStore::load_turns,WEBSOCKET_TOOL_CALL_CACHE, andSESSION_BUMPS. (Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel)
- glibc Allocator Tuning & Periodic
- [Report Bare Empty Gemini
STOPResponses as Streaming Errors] (Fixes #4071, Ref #4055, PR #4072, Thanks to @devsanthoshmk):- Eliminate Silent Empty HTTP 200 Streams: Emit an explicit streaming error instead of silently completing HTTP 200 when upstream Gemini returns a bare empty
STOPresponse with no content. (Fixes #4071, Ref #4055, PR #4072, Thanks to @devsanthoshmk)
- Eliminate Silent Empty HTTP 200 Streams: Emit an explicit streaming error instead of silently completing HTTP 200 when upstream Gemini returns a bare empty
- [Port Object-Only
anyOf/oneOfUnion Schema Merge frommaintobeta] (Ref #3878, Ref #815, PR #4067, Thanks to @zainulhasan, @snailb1007):- Flatten Complex Object Union Tool Schemas: Ported object-only
anyOf/oneOfunion schema merging tobetafor cleaner Gemini Protobuf tool validation compatibility. (Ref #3878, Ref #815, PR #4067, Thanks to @zainulhasan, @snailb1007)
- Flatten Complex Object Union Tool Schemas: Ported object-only
- [Gateway Security Hardening & WebUI/Headless Admin Route Parity] (Fixes #4064, Ref #4039, Ref #4049, PR #4065, PR #4075, PR #4079, Thanks to @koeria, @zainulhasan):
- Forwarded IP Trust, Constant-Time Auth, Media Read Guards & Token Redaction: Restricted
X-Forwarded-For/X-Real-IPtrust to loopback peers and extended IP filtering to/apiroutes; switchedapi_keyandadmin_passwordchecks to constant-time comparison; guarded local multimodal file reads with loopback-owner, size-cap, and magic-byte checks; redacted OAuth secret tokens before caching account snapshots tolocalStorage. (Ref #4039, PR #4065, Thanks to @zainulhasan) - Admin Routes, Query Param Preservation & Allow/Blocklist Clearing: Fixed
request.tsstripping query params (filter,limit) via substring matching, fixedclear_ip_whitelistand desktopclear_ip_blacklistrow-ID deletion, persistedpreferred_account_idacross admin restarts, and wired missing WebUI admin routes for minute stats, Droid sync, paginated logs, and model unfreeze. (Fixes #4064, Ref #4049, PR #4075, PR #4079, Thanks to @koeria, @zainulhasan)
- Forwarded IP Trust, Constant-Time Auth, Media Read Guards & Token Redaction: Restricted
- [Replace Full-System Process Refreshes with Targeted
ProcessRefreshKind] (Fixes #4073, PR #4074, PR #4080, Thanks to @fPip98, @zainulhasan):- Unified Targeted Process Discovery: Replaced
System::new_all()+refresh_all()across client discovery and process/patch helpers with sharedrefresh_processes_specifics()(cmd/exeonly), eliminating redundant CPU/memory polling and duplicate scans. (Fixes #4073, PR #4074, PR #4080, Thanks to @fPip98, @zainulhasan)
- Unified Targeted Process Discovery: Replaced
- [Windows + WSL Sync Hardening & Homebrew Beta Channel Guard] (Fixes #4032, Fixes #3973, Ref #4030, PR #4069, PR #4070, Thanks to @zainulhasan):
- Deduplicated WSL Sync & Pre-Relaunch Ordering: Deduplicated WSL UNC credential targets and distro reloads, replaced broad
killallwith scopedpkill, ordered WSL sync before IDE relaunch viaSystemIntegration::handles_wsl_sync, and fixed a Windows build borrow inwsl_sync. (Fixes #4032, Ref #4030, PR #4069, Thanks to @zainulhasan) - Homebrew Cask Channel Guard: Rejected Homebrew Cask upgrades on the Beta update channel and honored Homebrew Cask detection for stable startup update prompts. (Fixes #3973, PR #4070, Thanks to @zainulhasan)
- Deduplicated WSL Sync & Pre-Relaunch Ordering: Deduplicated WSL UNC credential targets and distro reloads, replaced broad
-
[添加账号预选代理节点、自动绑定与严格代理模式] (Fixes #4077):
-
前置选代理与自动绑定闭环: 在
AddAccountDialog中支持添加账号前(覆盖 OAuth 与 Refresh Token 导入全路径)预选代理节点;支持无头/CLI 参数透传AddAccountProxyOptions,在首次配额探测之前即完成账号与代理节点的持久化绑定 (bind_account_proxy_persistent) 并使用该节点客户端发起配额探测;同时修复节点达max_accounts上限时重复绑定已属该节点账号被误拒的问题,并补充代理池配置离线回退。(Fixes #4077) -
严格代理模式 (
strict_mode) Fail-Closed 保护: 新增ProxyPoolConfig.strict_mode配置及ABV_PROXY_POOL_STRICT_MODE/ANTIGRAVITY_PROXY_POOL_STRICT_MODE环境变量并在代理池设置页面透出切换开关(含 12 国多语言与说明)。开启后,绑定节点被禁用或不可用时直接拒绝回退直连,严防真实 IP 意外暴露。(Fixes #4077)
-
前置选代理与自动绑定闭环: 在
-
[用户 Token 专属上游账号池隔离授权] (Fixes #4058, PR #4059, Thanks to @dandelion-promise520, @cubelikeplayDaniel):
-
Token 级可用账号范围绑定: 在用户 Token 身份模型(
UserTokenIdentity)中持久化allowed_account_ids,在入站模型门禁、TokenManager账号调度、OpenAI 生图并发JoinSet任务以及 Responses WebSocket 链路全面强制校验授权账号子集;前端 Token 管理同步提供账号范围选择器与授权标签展示。(Fixes #4058, PR #4059, Thanks to @dandelion-promise520, @cubelikeplayDaniel)
-
Token 级可用账号范围绑定: 在用户 Token 身份模型(
-
[1M 上下文硬超限重试收敛、
/compact400 死锁防线与count_tokens思考缓存对齐] (Fixes #4024):-
400 超限判定收敛与无括号变体估算兜底: 复用流水线
UpstreamClassification::is_input_token_limit_exceeded,将四协议(Claude / Gemini / OpenAI Chat / Responses)遇到exceeds the maximum number of tokens的bump_session同账号重试收敛为最多 1 次,消除单包物理超限时的无效轮换等待;扩展无括号及省略input token count报错的正则解析并结合本地估算保底(input > max),为 Claude 客户端输出标准prompt is too long触发自动压缩。(Fixes #4024) -
/compact主动与响应式渐进裁剪及count_tokens对齐: 修复多文本块混排<system-reminder>时的压缩请求识别盲区与多键位思考缓存清理;新增compact_gemini_payload_to_budget与compute_reactive_compaction_budget四阶段防死锁管道(剥离历史 thinking/签名、清理历史及工具返回媒体、按安全user边界淘汰最旧轮次、UTF-8 中间截断);同时使/v1/messages/count_tokens计入 L1ThinkingStore将要回填的思考与签名开销。(Fixes #4024)
-
400 超限判定收敛与无括号变体估算兜底: 复用流水线
-
[>100MB 请求体监控保真与多模态滑动窗口全媒体/
functionResponse.parts覆盖] (Fixes #4083):-
统一请求体上限并消除 >100MB 静默置空: 在
server.rs抽离统一resolve_max_body_size()(默认 256 MB,尊重ABV_MAX_BODY_SIZE);重构monitor.rs使超过 100 MB 日志阈值但处于上限内的请求跳过全量缓冲并原样放行至下游 Handler,超限请求明确返回 HTTP 413Payload Too LargeJSON 报错,彻底消除此前无条件置为Body::empty()的问题。(Fixes #4083) -
多模态滑动窗口与估算器覆盖 PDF/音视频与嵌套
functionResponse.parts: 将apply_multimodal_sliding_window_and_limits与estimator.rs从顶层图片扩展到顶层及functionResponse.parts内嵌套的image/*、application/pdf、audio/*、video/*;驱逐嵌套文件时改为记录functionResponse.response._omitted_multimodal_parts元数据,严格避免向functionResponse.parts写入非法text部件,并同步更新前后端设置说明。(Fixes #4083)
-
统一请求体上限并消除 >100MB 静默置空: 在
-
[全局请求预算可配置、可选延长 TTFT 顶棚与流式建连后超时解绑] (Fixes #4061, Fixes #4063, PR #4076, PR #4081, Thanks to @koeria, @zainulhasan):
-
可配置请求全局预算与延长 TTFT 上限: 在超时设置面板、配置文件、管理 API 及
ANTIGRAVITY_GATEWAY_REQUEST_BUDGET_SECS中开放gateway_request_budget_secs配置,支持在预算超过 270 秒时按需开启延长首字等待(TTFT)顶棚。(Fixes #4061, PR #4081, Thanks to @zainulhasan) -
解绑流式首包后超时与入场预算夹紧: 修复
StreamLifecycleConfig::new将首包到达后的transition_secs与streaming_sliding_secs强行夹紧至剩余budget::remaining_secs()导致长排队/长思考建连后流中途被 3 秒超时误杀的问题,仅将initial_ttft_secs绑定剩余首字预算。(Fixes #4063, PR #4076, Thanks to @koeria)
-
可配置请求全局预算与延长 TTFT 上限: 在超时设置面板、配置文件、管理 API 及
-
[Linux glibc 内存 RSS 膨胀治理、热路径分配优化与无界缓存封顶] (Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel):
-
glibc 分配器调优与周期性内存归还: 新增跨平台内存统计与 Linux glibc 调优模块
memory_stats.rs(启动配置M_ARENA_MAX=2、M_MMAP_THRESHOLD/M_TRIM_THRESHOLD=128KiB并周期性执行malloc_trim(0),支持环境变量覆盖),同步更新运行时 Dockerfile 的MALLOC_ARENA_MAX=2并开放/api/system/memory与/api/system/memory/trim诊断接口。(Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel) -
消除热路径碎片与无界 Map 泄漏: 将 Gemini SSE 收集器中的 $O(N^2)$
format!拼接改为原地String::push_str;为proxy_db::save_log复用持久化有界 SQLite 写连接(8 MiB cache + 64 MiB mmap);将流式监控缓冲封顶为 4 MiB;并为TokenManager.session_accounts、SignatureCache2–4 层、ThinkingStore::load_turns、WEBSOCKET_TOOL_CALL_CACHE与SESSION_BUMPS统一实施 TTL + 容量上限淘汰。(Fixes #4054, PR #4060, Thanks to @cubelikeplayDaniel)
-
glibc 分配器调优与周期性内存归还: 新增跨平台内存统计与 Linux glibc 调优模块
-
[Gemini 空
STOP响应显式流式报错透传] (Fixes #4071, Ref #4055, PR #4072, Thanks to @devsanthoshmk):-
消除静默 HTTP 200 空流: 当上游 Gemini 在未产出实质正文时直接返回裸空
finishReason: "STOP"且流内自愈前已进入错误分支时,向客户端显式发送结构化流式错误事件,杜绝下游静默收到空 200 响应。(Fixes #4071, Ref #4055, PR #4072, Thanks to @devsanthoshmk)
-
消除静默 HTTP 200 空流: 当上游 Gemini 在未产出实质正文时直接返回裸空
-
[纯对象
anyOf/oneOf联合 Schema 合并策略移植至 Beta] (Ref #3878, Ref #815, PR #4067, Thanks to @zainulhasan, @snailb1007):-
复杂工具联合 Schema 无损展平: 从
main同步纯对象类型anyOf/oneOf联合 Schema 合并逻辑,提升复杂 MCP 与函数声明通过上游 Google Protobuf 校验的兼容性。(Ref #3878, Ref #815, PR #4067, Thanks to @zainulhasan, @snailb1007)
-
复杂工具联合 Schema 无损展平: 从
-
[网关纵深安全加固与 WebUI/Headless 管理端完整对齐] (Fixes #4064, Ref #4039, Ref #4049, PR #4065, PR #4075, PR #4079, Thanks to @koeria, @zainulhasan):
-
转发 IP、密钥比对、本地媒体与前端缓存加固: 限制仅来自回环代理的
X-Forwarded-For/X-Real-IP可信生效并扩大/apiIP 过滤覆盖;api_key与admin_password改用常量时间比对;多模态本地文件读取增加回环属主校验、体积上限与魔数验证;前端缓存账号快照到localStorage前剥离 OAuth 密钥令牌。(Ref #4039, PR #4065, Thanks to @zainulhasan) -
管理端路由补齐、查询参数与黑白名单修复: 修复
request.ts错误按子串吞掉filter/limit查询参数、clear_ip_whitelist及桌面端clear_ip_blacklist未按行 ID 删除导致清空失效、以及admin_set_preferred_account重启丢失的问题;补齐 WebUI 分钟统计、Droid 同步、分页日志与模型解冻管理路由。(Fixes #4064, Ref #4049, PR #4075, PR #4079, Thanks to @koeria, @zainulhasan)
-
转发 IP、密钥比对、本地媒体与前端缓存加固: 限制仅来自回环代理的
-
[进程发现全链路按需刷新性能优化] (Fixes #4073, PR #4074, PR #4080, Thanks to @fPip98, @zainulhasan):
-
淘汰
refresh_all()重扫描开销: 统一以仅采集cmd/exe的refresh_processes_specifics()替代客户端探测及剩余进程/补丁模块中的全量系统刷新,显著降低 CPU 与内存采集抖动并去除重复扫描。(Fixes #4073, PR #4074, PR #4080, Thanks to @fPip98, @zainulhasan)
-
淘汰
-
[Windows + WSL 切号同步与 Homebrew Beta 通道更新防护] (Fixes #4032, Fixes #3973, Ref #4030, PR #4069, PR #4070, Thanks to @zainulhasan):
-
WSL 同步去重与精准重启时序: 对 WSL UNC 凭据写入目标与发行版重载执行去重,用限定目标的
pkill替代宽泛killall,通过SystemIntegration::handles_wsl_sync统一在 IDE 重启前完成预同步,并修复wsl_sync在 Windows 构建下的借用检查错误。(Fixes #4032, Ref #4030, PR #4069, Thanks to @zainulhasan) - Homebrew Cask 通道隔离防护: 当更新通道设为 Beta 时阻止通过 Homebrew Cask 升级以免拉回稳定版,并在正式版通道启动检查中正确尊重 Homebrew Cask 安装形态。(Fixes #3973, PR #4070, Thanks to @zainulhasan)
-
WSL 同步去重与精准重启时序: 对 WSL UNC 凭据写入目标与发行版重载执行去重,用限定目标的
What's Changed
- feat(user-token): 支持为用户 Token 限定可用的上游账号范围 (Fixes #4058) by @dandelion-promise520 in #4059
- fix(memory): resolve Linux glibc RSS bloat, hot-path churn, and unbounded Rust caches (Fixes #4054) by @cubelikeplayDaniel in #4060
- perf(process): avoid full-system refresh during client discovery by @fPip98 in #4074
- fix(proxy): stop clamping post-TTFT stream timeouts to admission budget by @koeria in #4076
- fix(admin): keep WebUI query params, fix whitelist clear id, persist preferred account by @koeria in #4075
- fix(proxy): report empty Gemini STOP as a streaming error by @devsanthoshmk in #4072
- fix(updater,ui): reject Beta Homebrew Cask upgrades and honor Cask on stable startup updates (Fixes #3973) by @zainulhasan in #4070
- fix(desktop): deduplicate WSL UNC sync, replace killall with scoped pkill, and sync before IDE relaunch (Fixes #4032) by @zainulhasan in #4069
- fix(web,api,security): wire missing WebUI admin routes and fix desktop clear_ip_blacklist ID deletion (Fixes #4064) by @zainulhasan in #4079
- fix(proxy): port object-only anyOf/oneOf union schema merge from main to beta (Ref #3878, Ref #815) by @zainulhasan in #4067
- fix(security): harden forwarded IP trust, /api IP filter, secret comparison, local media reads, and token cache (Ref #4039) by @zainulhasan in #4065
- feat(proxy,ui): support configurable gateway_request_budget_secs and opt-in extended TTFT ceiling (Fixes #4061) by @zainulhasan in #4081
- perf(process,patch): replace remaining full-process refreshes with targeted ProcessRefreshKind (Refs #4073) by @zainulhasan in #4080
New Contributors
- @dandelion-promise520 made their first contribution in #4059
- @fPip98 made their first contribution in #4074
- @devsanthoshmk made their first contribution in #4072
Full Changelog: v5.0.5-beta.2...v5.0.5-beta.3