Repository navigation
v0.1.21
中文更新说明
v0.1.21 是一次聚焦 账号分组与子 Key 严格隔离(Issue #9)、代理与上游错误透出加固(Issue #12)、全客户端热续传提速、重型上下文与深度思考 504 根治、零冷启动号池轮询,以及 Web 控制台交互全面升级 的重要版本。
✨ 核心新特性与重大改进
1. 账号分组与子 Key 绑定隔离(Issue #9)
- 严格组内调度、绝不越界:支持在 Web 管理台「凭证池」中新建、重命名、删除账号分组,并为单个或勾选账号通过下拉弹窗一键分配分组;在「网关子密钥」中可将任意
sk-aq-...绑定到指定分组,绑定后仅调度该分组内账号——组内无可用号或额度耗尽时明确返回503 group_no_enabled_keys/429 quota_exhausted,绝不跨组或静默回退到全局号池。 - 老用户 100% 零破坏兼容:升级后原有未设分组的账号与子密钥默认继续工作在全局号池,无需任何迁移或手工调整。
- 实时隔离生效与审计可见:账号改组、删组或分组改名会即时驱逐旧亲和并清理失效热连接,同时同步更新在途等待队列与子密钥绑定;「实时请求日志」完整记录分组归属与命中槽位,支持按分组筛选与排查。
2. 全客户端热续传大幅提速 & 重型 OOB 上下文修复
-
通用 IDE 动态外壳归一化(热续传提速 4×):统一抽离客户端无关的
$O(N)$ 线性标签归一化扫描器并合并首轮前导连续user消息,稳定兼容 Claude Code / Codex CLI / Cursor / Cline / Roo / Kilo / Windsurf / Trae / Antigravity / OpenCode 每轮动态改写<user_info>、<open_and_recently_viewed_files>、<environment_context>、<system-reminder>等元数据,避免热连接击穿(Cursor 65KB 20 工具场景 Turn 2 从13.8s冷重放降至1.2~3.2s增量热续传),同时保留<ide_selection>杜绝不同代码片段短句撞哈希串话。 -
重型系统提示词(
>36 KB)OOB 提问保底:修复 Claude Code / 重型 IDE 客户端在超过 36 KB 系统提示词触发带外.txt上传时可能压缩挤掉用户最新提问的问题(36–43 KB 保单帧且留足内联提问,>43 KB 分片尾帧保底保留最多 8 KB 内联提问),并按真实 UTF-8/JSON 字节密度动态二分内联最高 32 KB,减少不必要的云端沙盒读文件耗时。 -
SSE 低延迟输出:响应头提交时启用
socket.setNoDelay(true),消除 Nagle 攒包延迟。
3. 长思考 504 误杀根治 & 零冷启动高可用号池轮询
- 深度思考 504 误杀清零:在
thinking_complete、tool_progress、tool_arguments、tool_result节点自动重置分段思考计时器,并将默认单段思考保护上限收口为与RUN_IDLE_TIMEOUT_MS单调一致(默认 10 分钟/段、15 分钟总上限),彻底解决quick-smart-think/quick-smart-max多段深度思考或云端工具跨 5 分钟被误杀 504,同时清理 3 处定时器与预中止错误吞噬边界。 quota-aware并发感知与分组独立轮询:严格隔离保护<15%残血号(刚恢复的 1% 5h 窗口号不再被并发打爆),其余健康号先按最低activeInflight摊平并发再优先>=40%顶档;轮询游标升级为按分组隔离的rrIndexByGroup并步进到(chosenIdx + 1) % n,彻底根治尾部停用号导致的轮询偏科与跨组饿死。- 零冷启动精准切号:将
Service is busy/overloaded/529归类为瞬态短退避(2.5–4.5s)并仅驱逐当前失败会话的粘性亲和,同账号其他健康会话 100% 保留热连接,杜绝连锁冷启动雪崩。
4. 实时观测路由模型提示、代理兜底加固(Issue #12)与控制台体验升级
- 思考块路由模型提示(
SHOW_ROUTED_MODEL_IN_THINKING):默认true仅在开启思考(effort != off或上游输出思考流)的轮次首行展示档位、思考程度及实时观测到的底层实际模型(routed=/routed≈,启动自动从request-traces.json预热缓存),保持纯文本effort=off响应纯净不污染;支持在后台「路由与策略」随时热切true/always/false,全协议同步输出x-quick-mode/x-quick-effort/x-quick-routed-model响应头,OpenAI Responses 严格保持[reasoning, message]合规顺序。 - Issue #12 代理与内层错误加固:未配单号代理时自动兜底读取
HTTPS_PROXY/HTTP_PROXY/ALL_PROXY并完整遵循含 IPv6 与通配符的NO_PROXY;修复明文http:目标代理误套 TLS;OAuthqbs-event与 Webqbsproxy统一校验内层status >= 400与errorMessage避免静默吞错。 - 启动自愈与协议细部修复:修复历史
request-traces.json含 404 未知模型记录时重启预热报错的边界;parallel_tool_calls: false/disable_parallel_tool_use: true裁剪多余工具时自动跳过热回泊防止下一轮错位;启动检测只读/app/data:ro(EROFS)打印明确修复提示。 - Web 管理台全面打磨:
- 单号与批量分配分组统一升级为下拉式弹窗(展示已有分组与账号数,支持弹窗内直接新建分组);
- 凭证页工具栏由 9 个平铺按钮收敛为 5 个清晰入口(
检测与维护/导入导出/批量操作均采用统一视口定位悬浮+点击下拉菜单,修复容器裁切与样式不统一); - 明确区分顶部「刷新最新额度」(只读)与「重测复活异常号」(清理冷却并探测复活);
- 全站 6 个页面及版本热更弹窗全面统一
uiConfirm二次确认(彻底替换原生window.confirm),补齐中英双语词条与####Release Notes 渲染。
English Release Notes
v0.1.21 focuses on Account Groups & Strict Sub-Key Isolation (Issue #9), Proxy Fallback & Inner Error Hardening (Issue #12), Universal IDE Warm-Session Acceleration, Long-Thinking 504 Elimination, Zero-Cold-Start Pool Scheduling, and a Polished Web Console UX.
✨ Highlights & Major Improvements
1. Account Groups & Strict Sub-Key Isolation (Issue #9)
- Strict in-group scheduling: Create, rename, or delete account groups in Credentials and assign accounts individually or in batch via a dropdown modal; bind any
sk-aq-...sub-key to a specific group in Sub-Keys to enforce strict in-group scheduling—when a bound group has no enabled/available accounts, the gateway returns an explicit503 group_no_enabled_keysor429 quota_exhaustederror and never leaks across groups or falls back to the global pool. - 100% backward compatible: Existing ungrouped credentials and sub-keys continue operating in the global pool seamlessly with zero configuration changes.
- Instant invalidation & trace visibility: Moving, renaming, or deleting a group immediately evicts stale affinity & warm connections, updates waiting queues and sub-key bindings, and records
accountGroupin Request Logs for filtering and auditing.
2. Universal IDE Warm-Session Acceleration & Heavy OOB Prompt Preservation
-
4× faster follow-ups across coding IDEs: Unified
$O(N)$ linear tag normalization and leading-user-turn merging keepconversationKeyandwarm_incrementalprefix hashes rock-solid even when Claude Code, Codex CLI, Cursor, Cline, Roo, Kilo, Windsurf, Trae, Antigravity, or OpenCode mutate<user_info>,<open_and_recently_viewed_files>,<environment_context>, or<system-reminder>on every turn (dropping 65KB 20-tool Cursor Turn-2 latency from13.8scold replay to1.2–3.2swarm incremental), while preserving<ide_selection>to prevent short-query hash collisions. -
Heavy
>36 KBsystem-prompt OOB fix: Guarantees the user's latest prompt stays inline when heavy IDE system prompts exceed 36 KB and trigger out-of-band.txtuploads, backed by real UTF-8/JSON binary-search dynamic inlining (up to 32 KB) andsocket.setNoDelay(true)on SSE headers.
3. Long-Thinking 504 Elimination & Zero-Cold-Start Pool Rotation
- No more false 504s on deep thinking: Resets the thinking watchdog across
thinking_complete,tool_progress,tool_arguments, andtool_result, aligns the per-segment thinking ceiling monotonically withRUN_IDLE_TIMEOUT_MS(default 10 min/segment, 15 min total), and fixes pre-abort/pre-buffered error draining and timer leaks. - Balanced
quota-aware& per-group round-robin: Strictly shields endangered<15%accounts, spreads active concurrency across safe slots first before preferring>=40%top-tier slots, and uses per-grouprrIndexByGroupstepping to(chosenIdx + 1) % nto eliminate disabled-slot skew and cross-group starvation. - Zero-cold-start failover: Classifies
Service is busy/overloaded/529as brief 2.5–4.5s transient backoff and evicts only the failed conversation's affinity so healthy sessions on the same account retain warm WebSockets.
4. Live Routed-Model Headers, Proxy Hardening (Issue #12) & Web Console Polish
- Observed routed-model header (
SHOW_ROUTED_MODEL_IN_THINKING): Defaulttruesurfaces mode, effort, and live observed routed model (routed=/routed≈, auto-seeded fromrequest-traces.jsonon startup) only on thinking-enabled turns while keeping plaineffort=offreplies clean; hot-toggleable (true/always/false) in Routing & Strategy, withx-quick-mode,x-quick-effort, andx-quick-routed-modelHTTP response headers across all protocols and strict[reasoning, message]ordering in OpenAI Responses SSE. - Issue #12 proxy & upstream checks: Automatically falls back to
HTTPS_PROXY/HTTP_PROXY/ALL_PROXYrespecting IPv6/wildcardNO_PROXY, skips TLS wrapping on plaintexthttp:tunnel targets, and checks innerstatus >= 400/errorMessageon OAuthqbs-eventand Webqbsproxy. - Reliability fixes: Hardened startup trace seeding against unknown-model 404 entries, skipped warm parking after
parallel_tool_calls: false/disable_parallel_tool_use: truetruncation, and added actionableEROFShints for read-only/app/data:romounts. - Web Console UX upgrade:
- Unified dropdown modal for single and batch account group assignment (with inline group creation);
- Streamlined Credentials toolbar from 9 flat buttons into 5 clean controls with viewport-aware fixed dropdown menus (eliminating container clipping and style mismatch);
- Clearly separated read-only Refresh Latest Quota from Recheck & Revive Unhealthy;
- Unified
uiConfirmconfirmation dialogs across all 6 console tabs and the self-update/rollback modal (removing nativewindow.confirm), plus####Release Notes rendering and full EN/ZH localization.
📦 Upgrade Notes
- One-Click Web Self-Update (
v0.1.20+): Click the version pill in the Web Console → Update & Restart (automaticSHA256SUMS.txt+depsHashverification and auto-rollback). - Docker Compose: Run
docker compose pull && docker compose up -d(keep your existing.envand./data). - Source Deploy: Run
git pull && npm ci && npm run buildand restart (npm start).