Carry tool CallID in loop events and add reasoning_split to the chat client #42

Merged
weichen merged 1 commits from feature/e1-parallel-reasoning into main 2026-10-10 08:36:09 +00:00
Owner

为 backend 的并行工具执行与 MiniMax 思考分流铺路:①内核 tool_execution_start/end 事件带 CallID(并行下按 ID 配对,附回归测试);②Client.ReasoningSplit 可选地在 openai-chat 请求体加 reasoning_split=true(MiniMax 思考走独立 reasoning_content 字段,SSE 捕获路径不变,附请求体测试)。加法变更,默认行为不变;go test ./... 全绿。

Refs: Dev 提案 2026-10-10-agent-delegation-routing-sandbox.md F2/F5;Dev 任务 feature/agent-e1-parallel-fixes。

为 backend 的并行工具执行与 MiniMax 思考分流铺路:①内核 tool_execution_start/end 事件带 CallID(并行下按 ID 配对,附回归测试);②Client.ReasoningSplit 可选地在 openai-chat 请求体加 reasoning_split=true(MiniMax 思考走独立 reasoning_content 字段,SSE 捕获路径不变,附请求体测试)。加法变更,默认行为不变;go test ./... 全绿。 Refs: Dev 提案 2026-10-10-agent-delegation-routing-sandbox.md F2/F5;Dev 任务 feature/agent-e1-parallel-fixes。
weichen added 1 commit 2026-10-10 08:34:09 +00:00
Carry tool CallID in loop events and add reasoning_split to the chat client
ci / vet-and-test (pull_request) Successful in 50s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
1f25049492
Why: Parallel tool execution makes same-turn tool events interleave, so
consumers can no longer pair starts and ends by order; the kernel Event
needs the call ID. MiniMax interleaved-thinking models stream their
reasoning inside content <think> blocks unless the OpenAI-compatible
request opts in with reasoning_split=true, which forces reasoning into
the dedicated reasoning_content field the SSE layer already captures.

Evidence: go test ./... green; new tests TestLoopToolEventsCarryCallID
and TestOpenAIChatBodyReasoningSplit pin both behaviors (regression
anchors for the backend parallel-work change).

Impact: Additive Event.CallID (empty for non-tool events; existing
consumers unaffected) and an opt-in Client.ReasoningSplit flag that only
adds a request field when set. No default behavior change.

Refs: Agent-System-Dev proposal 2026-10-10-agent-delegation-routing-sandbox.md
(F2/F5), Dev task feature/agent-e1-parallel-fixes.
weichen merged commit d6267fba15 into main 2026-10-10 08:36:09 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Native#42