- [Gemini Thought-Signature Priority & Full-History Auto-Heal Gatekeeper] Enforce thoughtSignature extraction priority for tool calls and expand outbound gatekeeper across entire history to eliminate Google HTTP 400 (Fixes #3529, Fixes #3531, Ref #3535, Thanks to @EricZhou05):
- Prioritized Extraction for Mixed Tool Turns: Fixed a traversal ordering vulnerability in
finalize_gemini_contents_thinking_with_sessionandplace_turn_signature_scoped. When an assistant turn contains both commentarytextandfunctionCall, signature extraction strictly prioritizesfunctionCallparts, preventing commentary text from stealingturn_real_sigand bypassing the SQLite/L1 cache penetration recovery flow. - Parallel Tool Call Signature Preservation: Refined non-anchor part sanitation. While ensuring signatures on
textandthoughtparts are cleaned, valid signatures already present on subsequentfunctionCallparts in parallel tool calling turns are strictly preserved. - Full-History Outbound Auto-Heal Gatekeeper (Pipeline First): Expanded the
InboundThinkingPipelineoutbound safety gatekeeper to scan the entire conversation history instead of only[last_user_turn..]. Any historical or activefunctionCallmissing a signature is automatically backfilled with Google's officialSENTINEL_SIGNATURE(skip_thought_signature_validator), guaranteeing zero HTTP 400 errors from Google's strict validator.
- Prioritized Extraction for Mixed Tool Turns: Fixed a traversal ordering vulnerability in
- [Gemini 思维链工具调用签名优先级与全历史自愈门禁] 强化混合轮次与并发工具调用 thoughtSignature 提取优先级,终审出站门禁升级为全历史扫描彻底杜绝 Google HTTP 400 (Fixes #3529, Fixes #3531, Ref #3535, Thanks to @EricZhou05):
- 混合轮次工具调用签名优先提取: 在
finalize_gemini_contents_thinking_with_session与place_turn_signature_scoped中彻底修复线性遍历导致的签名争抢漏洞。当 assistant 轮次同时包含说明正文(text)与工具调用(functionCall)时,强制优先从functionCall提取合法凭据,杜绝说明正文抢先霸占turn_real_sig并反向 bypass 绕过 SQLite/L1 工具签名缓存穿透找回机制。 - 并发工具调用(Parallel Tool Calls)签名保护: 优化非锚点部件清洗逻辑,在清除误挂在正文或思考块上签名的同时,严格保留并发工具调用中后续
functionCall已有的合法签名,避免并发工具因签名被清空触发上游校验拦截。 - 出站终审安全自愈门禁全历史覆盖 (Pipeline First): 将
InboundThinkingPipeline的出站门禁扩展至全会话历史轮次。无论是当前活跃轮次还是处于深层历史(如多轮对话第 259 轮)的远古工具调用,出站前一律自动补齐 Google 官方合法哨兵SENTINEL_SIGNATURE(skip_thought_signature_validator),构建 100% 免疫Function call is missing a thought_signature(HTTP 400)的铁壁防线。
- 混合轮次工具调用签名优先提取: 在
What's Changed
- fix(proxy): fix thought_signature 400 on mixed tool calls by @EricZhou05 in #3568
New Contributors
- @EricZhou05 made their first contribution in #3568
Full Changelog: v4.8.6-beta.9...v4.8.6-beta.10