Skip to content

gproxy v2.9.6

Choose a tag to compare

@LeenHawk LeenHawk released this 30 Aug 13:53

v2.9.6

Fixes cross-protocol Gemini tool-call lifecycles for OpenAI Chat and Claude
clients, including parallel streaming calls and multi-result tool histories.

修复 Gemini 工具调用转换到 OpenAI Chat 和 Claude 时的生命周期问题,包括
并行流式调用以及包含多个工具结果的历史消息。

English

Fixed

  • Parallel Gemini tool calls now keep distinct OpenAI Chat stream indexes. The Gemini-to-Chat stream converter retains per-choice state for the lifetime of the response, numbers tool calls independently across chunks, and reports finish_reason: "tool_calls" when a normal Gemini STOP follows tool output. Non-streaming responses now use the same terminal semantics, while truncation and content filtering retain their original finish reasons.
  • Gemini-to-Claude streams now finish tool turns as tool_use. Tool calls observed before the terminal chunk remain part of the stream state, preventing an empty final STOP chunk from being misreported as end_turn.
  • OpenAI Chat tool histories now produce valid Gemini user turns. Consecutive tool results are grouped into one multi-part user turn and merged with an immediately following user message, avoiding parallel function-response mismatches and zero-token empty replies. Invalid JSON arguments still retain their parent function call, and Gemini thoughtSignature values can round-trip through Chat tool-call extension fields.

简体中文

修复

  • Gemini 并行工具调用现在会获得不同的 OpenAI Chat 流式索引。 Gemini 到 Chat 的流转换器会在整条响应期间保留每个 choice 的状态,跨 chunk 独立编号工具调用,并在正常 Gemini STOP 出现在工具输出之后时返回 finish_reason: "tool_calls"。非流式响应现在也采用相同的结束语义,同时截断和内容过滤仍保留原有结束原因。
  • Gemini 到 Claude 的流式工具轮次现在会以 tool_use 结束。 终止 chunk 之前出现的工具调用会保留在流状态中,避免仅含空内容的最终 STOP chunk 被误报为 end_turn
  • OpenAI Chat 工具历史现在会生成合法的 Gemini user turn。 连续工具结果会合并为一个多 part 的 user turn,并与紧随其后的用户消息合并,避免并行 function response 数量不匹配以及 0-token 空回复。非法 JSON 参数仍会保留其父 functionCall,Gemini thoughtSignature 也可通过 Chat 工具调用扩展字段往返保留。