- [OpenAI Responses API Structured Outputs, Pipeline Tool Conflict Mitigation & Zero-Loss Unwrapping] (Fixes #3710, Ref #3723, Thanks to @cubelikeplayDaniel):
- Inbound Protocol Normalization: Supported
text.formatspecifications inOpenAIRequestfor the Responses API, extractedeffective_response_formatin request mapping, and normalized it into Gemini nativegenerationConfig.responseSchemaandresponseMimeType: "application/json", unblocking Codex Desktop's automatic thread naming (thread_title) and summary generation. (Fixes #3710, Ref #3723, Thanks to @cubelikeplayDaniel) - Background Thinking Budget Convergence & Timeout Prevention: Explicitly honored
reasoning.effort: "low"to constrain the thinking budget to 1024 tokens for background short tasks, eliminating 30-second hard timeout aborts by the Codex client during thread title generation on high-effort models. (Fixes #3710) - Unified Tool Conflict Mitigation in Pipeline (Pipeline First): Moved the mutual exclusivity handling of
responseSchemaandtools/toolConfigdown toalign_google_request_prefix_topology_with_modelinsrc/proxy/pipeline/inbound.rs, suppressingcanonical_toolsandcanonical_tool_configacross all protocols whenresponseSchemais active to eliminate upstream HTTP 400 rejections. (Fixes #3710, Ref #3723) - Guarded Outer Unwrap & Zero-Loss Conversational Protection: Guarded
convert_chat_response_to_responseswithis_structured_outputto preserve 100% of conversational commentary in normal turns (preventing conversational data loss), while applyingunwrap_outer_code_fence_if_structuredstrictly when the entire response is enclosed in markdown fences to unblock Codex Desktop's nativeJSON.parsewithout corrupting embedded code blocks. (Fixes #3710, Ref #3723)
- Inbound Protocol Normalization: Supported
- [Dynamic Upstream Timeout Budget Convergence, Transient Account Unbinding & 429 Leakage Elimination] (Fixes #3713, Ref #3506, Ref #3525, Ref #3720, PR #3714, Thanks to @cubelikeplayDaniel):
- TTFT Header Watchdog & Total Budget Convergence: Tightened primary streaming response header watchdog to a 30s base (elastically extended up to 45s for large payloads) with a 25s fallback margin, bounding total fallback budget to 55
70s (30s for non-streaming) and eliminating 85s140s hangs on congested endpoints. (Fixes #3713, PR #3714, Thanks to @cubelikeplayDaniel) - Architectural Alignment: Stripped Hardcoded Slow Endpoint Demotion: Stripped
mark_failureon HTTP 200 responses to prevent healthy endpoints from thrashing, delegating throttling decisions entirely to the QoSGuardian scheduler. (Ref #3720, PR #3714) - Transient Account Cooldown & Immediate Sticky Session Unbinding: Added
mark_account_transient_failureinTokenManagerto apply a 30s cooldown and atomically unbind all associated sticky sessions when an account encounters terminal network/watchdog errors across all candidate endpoints, allowing subsequent requests to seamlessly migrate to healthy accounts. (PR #3714) - Integrated FailureStatusTracker into Claude Protocol: Fully integrated
FailureStatusTrackerintoclaude.rsretry loops, recordingGATEWAY_TIMEOUTon network errors and downgrading final status to 504 Gateway Timeout unless all attempts were genuine 429s, eliminating 64-second client backoff freezes. (PR #3714) - Refactored Multi-Day Hard Quota Exhaustion Detection: Accurately identified responses with
quotaResetDelay > 30min(e.g., 68h) as account-level hard quota exhaustion, triggering 50ms rapid rotation in multi-account pools. (PR #3714)
- TTFT Header Watchdog & Total Budget Convergence: Tightened primary streaming response header watchdog to a 30s base (elastically extended up to 45s for large payloads) with a 25s fallback margin, bounding total fallback budget to 55
- [Streaming Giant Tool Call Grace Period Transition & Claude Thinking Budget Default Fallback] (Fixes #3739, Ref #3735, PR #3740, PR #3742, Thanks to @cubelikeplayDaniel):
- Streaming Giant Tool Call Buffer Transition: Relaxed the cliff transition condition to
matches!(phase, StreamPhase::Thinking | StreamPhase::Streaming), automatically transitioning to StreamPhase::Transition with a 180s grace period when generating 10,000+ tokens giantfunctionCallpayloads, preventing premature termination at 120s. (Fixes #3739, PR #3740, Thanks to @cubelikeplayDaniel) - Claude Thinking Budget Official Default Fallback: In
src-tauri/src/proxy/model_specs.rs(resolve_custom_budget), ensured Claude models returnNonewhenclaude_budgetor tiered budgets are<= 0(unconfigured), enablingInboundThinkingPipelineto retrieve the authoritative default budget fromofficial_info.thinking_budget(e.g. 1024). (Ref #3735, PR #3742, Thanks to @cubelikeplayDaniel)
- Streaming Giant Tool Call Buffer Transition: Relaxed the cliff transition condition to
- [Mini Floating Window React Router 404 Fallback & Synchronous Resolution] (PR #3741, Thanks to @cubelikeplayDaniel):
- Synchronous Mini Window Resolution: Enhanced synchronous resolution in
App.tsxusingwindow.location.search(?mini=1) and__TAURI_INTERNALS__to eliminate page routing re-entry caused by asynchronous IPC window label delays. (PR #3741, Thanks to @cubelikeplayDaniel) - React Router 404 Error Boundary Fallback: Supplemented
createBrowserRouterwitherrorElement,index.htmlredirection, and wildcard*fallback routes to completely eliminate default 404 error boundary screens. (PR #3741)
- Synchronous Mini Window Resolution: Enhanced synchronous resolution in
- [OpenAI Responses API 结构化输出支持、流水线工具冲突治理与零误杀解壳] (Fixes #3710, Ref #3723, Thanks to @cubelikeplayDaniel):
- 协议层入站规范化: 在
OpenAIRequest中支持 Responses API 的text.format规范,并在适配器中统一定位与提取effective_response_format,规范化映射为 Gemini 原生generationConfig.responseSchema与responseMimeType: "application/json",打通 Codex Desktop 对话自动命名(thread_title)、摘要生成等后台结构化任务。(Fixes #3710, Ref #3723, Thanks to @cubelikeplayDaniel) - 后台任务思考预算收敛与防超时: 显式遵循
reasoning.effort: "low",将后台短任务的思考预算收敛在 1024 以内,彻底消除高思考模型在对话命名时触发 Codex 客户端 30 秒硬超时中断报错的隐患。(Fixes #3710) - 流水线统一工具冲突治理 (Pipeline First): 将
responseSchema与tools/toolConfig的互斥治理下沉至src/proxy/pipeline/inbound.rs的align_google_request_prefix_topology_with_model统一出口,当检测到responseSchema生效时主动清空canonical_tools与canonical_tool_config,跨协议彻底杜绝上游 400 校验拒绝。(Fixes #3710, Ref #3723) - 出站受控整包解壳与常规对话零误杀保障: 在
convert_chat_response_to_responses中引入is_structured_output严格门禁,常规对话 100% 原始呈现(杜绝日常聊天文本被误删截断);仅在结构化任务下采用unwrap_outer_code_fence_if_structured严格整包解壳,避免破坏内嵌代码块并确保 Codex Desktop 原生JSON.parse正常解析。(Fixes #3710, Ref #3723)
- 协议层入站规范化: 在
- [上游超时预算动态收敛、故障账号解绑与 Claude 429 泄漏清除] (Fixes #3713, Ref #3506, Ref #3525, Ref #3720, PR #3714, Thanks to @cubelikeplayDaniel):
- 响应头看门狗与总预算精准收敛: 将流式首选端点 HTTP 响应头看门狗基准收敛至 30s(超大 payload 弹性放宽至 45s),备用回退预算 25s,全链路总预算由原先的 150s 大幅收敛至 55~70s(非流式严格 30s),彻底杜绝主端点在排队拥塞时长时间挂死。(Fixes #3713, PR #3714, Thanks to @cubelikeplayDaniel)
- 架构哲学对齐与剔除慢端点粗暴降级: 剔除对成功响应但耗时偏长的端点判定
mark_failure与进入冷却期,避免健康端点被轮流误杀与震荡,将延迟与限速裁决权完全交由 QoSGuardian 调度器统御。(Ref #3720, PR #3714) - 全端点故障账号短时冷却与粘性解绑迁移: 在
TokenManager中提供mark_account_transient_failure,当协议处理层发生全端点超时或网络错误时,立即对该账号施加 30s 短时冷却并原子清理其绑定的所有粘性会话,使后续请求无缝自动迁移至其他健康账号。(PR #3714) - Claude 协议接入 FailureStatusTracker 消除 429 泄漏: 在
claude.rs重试循环中完整接入FailureStatusTracker,网络/看门狗超时显式记录GATEWAY_TIMEOUT,最终状态码仅在全量尝试均为 429 时才返回 429,一旦包含网络超时则降级返回 504 Gateway Timeout,彻底根除客户端 1 分钟退避冻结。(PR #3714) - 重构多账号跨天硬配额耗尽检测: 将
quotaResetDelay > 30min(如 68 小时)且包含quota_exhausted的响应准确识别为账号级硬配额枯竭,在多账号环境下立即执行 50ms 闪电切号,避免 CPU 阻塞并快速恢复响应。(PR #3714)
- [流式巨型工具调用跃迁宽限期与 Claude 思考预算默认回退] (Fixes #3739, Ref #3735, PR #3740, PR #3742, Thanks to @cubelikeplayDaniel):
- 流式巨型工具调用缓冲跃迁宽限期: 放宽过渡断崖自动跃迁条件为
matches!(phase, StreamPhase::Thinking | StreamPhase::Streaming),允许在 Streaming 阶段生成 10,000+ tokens 巨型functionCall缓冲静默时自动跃迁至 Transition 宽限期并赋予 180s 保护,彻底消除满 120s 滑动超时被误杀提前截断的问题。(Fixes #3739, PR #3740, Thanks to @cubelikeplayDaniel) - Claude 思考预算缺省回退官方默认值: 在
src-tauri/src/proxy/model_specs.rs的resolve_custom_budget中,针对 Claude 思考模型当配置的预算<= 0时统一返回None,使流水线正确回退并取回官方模型结构体权威默认值(如 1024),避免将-1误当下发配置。(Ref #3735, PR #3742, Thanks to @cubelikeplayDaniel)
- 流式巨型工具调用缓冲跃迁宽限期: 放宽过渡断崖自动跃迁条件为
- [Mini 桌面悬浮视窗 React Router 404 兜底与同步判定] (PR #3741, Thanks to @cubelikeplayDaniel):
- 增强 Mini 悬浮窗同步判定机制: 优先使用
window.location.search(?mini=1) 与__TAURI_INTERNALS__立即同步判定,消除 Tauri 异步 IPC 窗口 label 解析延迟引发页面路由重入的偶发白屏。(PR #3741, Thanks to @cubelikeplayDaniel) - React Router 404 错误边界兜底: 在
createBrowserRouter中补充errorElement、index.html重定向以及通配符*重定向 fallback,彻底消除 React Router 默认 404 错误边界页。(PR #3741)
- 增强 Mini 悬浮窗同步判定机制: 优先使用
What's Changed
- fix(ui): 修复 Mini 悬浮窗加载 index.html 触发 React Router 404 错误边界与同步判定失效 by @cubelikeplayDaniel in #3741
- fix(proxy): 允许 Streaming 阶段在巨型工具调用缓冲静默时自动跃迁至 Transition 宽限期 (Fixes #3739) by @cubelikeplayDaniel in #3740
- fix(proxy): 修复 Claude 模型思考预算未配置时回退官方模型结构体默认值 (Ref #3735) by @cubelikeplayDaniel in #3742
- fix(proxy): 引入上游看门狗全链路超时动态预算与算力枯竭快速探活机制 (Ref #3713, Ref #3506, Ref #3525) by @cubelikeplayDaniel in #3714
Full Changelog: v5.0.0-beta.0...v5.0.0-beta.1