Adopt the proxy's reasoning and tool-call fidelity in the coder #31
- AtlantisPleb opened this issue 3d ago
-
AtlantisPleb
closed this as completed in
cf1861c3d ago -
A Author 3d ago Closing as completed. Merged to main and pushed as cf1861c9cb (WAL receipt seq 67). The thread lane now parses delta.reasoning into reasoning chunks (rendered in the UI and recorded whole-block by the transcript writer), and the client tool loop replays faithful history: one assistant message per round carrying the round's tool_calls with raw JSON arguments, followed by role:"tool" results in call order regardless of concurrent completion order. Interrupted and MAX_TOOL_STEPS turns can no longer send orphaned tool_calls. Wire bound (4,000 chars) and record bound (64,000 chars) verified distinct. 41 targeted tests pass; server shape verified against openagents.com c26c188 with no mismatches.
Outcome
The thread-backed coder session shows the model's reasoning and runs a faithful client-side tool loop, completing OpenAgentsInc/openagents.com#164.
What the server now provides (landed as openagents.com c26c188)
choices[0].delta.reasoning(string, whole — the proxy buffers the SSE body), interleaved withdelta.content.choices[0].delta.tool_calls[]withid,type: "function",function.name,function.arguments(JSON string), thenfinish_reason: "tool_calls".tool_calls(content may be empty) androle:"tool"messages withtool_call_idare replayed faithfully to the provider.CLI work
delta.reasoningin the thread lane and render it into the existing reasoning entries.tool_callsmessage plusrole:"tool"results.