Skip to content

gproxy v3.0.6

Choose a tag to compare

@github-actions github-actions released this 07 Sep 18:07
· 61 commits to main since this release

v3.0.6

Fix streamed usage and tool-call lifecycles for Claude Code, Gemini CLI and Codex when using OpenAI Chat upstreams.

English

Fixed

  • OpenAI Chat → Claude Messages now initializes message-start usage and preserves cumulative token counts and stop reasons through trailing usage frames. Empty text, reasoning and refusal deltas no longer create or switch content blocks.
  • OpenAI Chat → Gemini accumulates fragmented tool arguments before emitting a complete function call, preserving interleaved calls and preventing tools from running with missing parameters.
  • Gemini session replay accepts identical adjacent function results carrying the same explicit call ID without duplicating upstream tool results. Separate calls without IDs remain distinct.
  • OpenAI Chat → Responses emits item and content lifecycles around deltas, closes tool calls with complete arguments, includes completed items in the final response, and retains usage arriving after the finish-reason chunk.

Added

  • Regression coverage for Anthropic usage, empty deltas, fragmented Gemini tool arguments, replayed tool results and Responses event ordering, final output and trailing usage.

Changed

  • Responses tool items finish on the upstream finish-reason chunk; the response completes when the stream ends, allowing trailing usage to arrive.
  • Verified file editing and shell execution with Claude Code, Gemini CLI and Codex against NVIDIA GPT-OSS 20B through an OpenAI Chat upstream. Codex verification used function tools with shell-based apply_patch.

简体中文

修复

  • OpenAI Chat → Claude Messages 在开始帧初始化 usage,并在尾部用量帧中保留累计 token 数和停止原因;空文本、推理和拒绝增量不再创建或切换内容块。
  • OpenAI Chat → Gemini 先累计分片工具参数,再发送完整函数调用,保留交错调用,避免工具收到空参数。
  • Gemini 会话恢复兼容相邻、内容完全相同且带相同显式调用 ID 的工具结果,避免向上游重复发送;没有 ID 的独立调用仍保持区分。
  • OpenAI Chat → Responses 补齐增量前后的内容与条目生命周期,以完整参数结束工具调用,在最终响应中保留已完成条目,并保留 finish_reason 之后到达的 usage。

新增

  • 补充 Anthropic usage、空增量、Gemini 工具参数分片与结果重放,以及 Responses 事件顺序、最终输出和尾部 usage 的回归覆盖。

调整

  • Responses 工具条目在上游 finish_reason 帧到达时结束;整体响应在流结束时完成,以接收尾部 usage。
  • 已通过 NVIDIA GPT-OSS 20B 的 OpenAI Chat 上游实测 Claude Code、Gemini CLI 和 Codex 的文件编辑与 shell 执行。Codex 使用 function 工具及 shell apply_patch 进行验证。