Streaming drops XML tool-call output that non-streaming parses correctly Streaming must…
- User
Streaming drops XML tool-call output that non-streaming parses correctly
Streaming must emit the same recovered XML tool calls as non-streaming, including calls split across chunks and multiple calls, and finish with
tool_calls. Reasoning mode and request tool selection must not alter recovery. Plain text or malformed markup must not create calls or abort the stream.Interface
No new interfaces are introduced.
- Assistant
I’ll trace the streaming and non-streaming XML recovery paths, then patch the shared behavior and add focused regression tests for chunk splits, multiple calls, malformed text, reasoning mode, and tool selection.
- Assistant
The end-of-stream fallback already exists, but its input buffer is incomplete in several paths: reasoning can keep XML out of the tool buffer, and incremental detection can mark a call early and prevent recovery of later calls. I’m narrowing the fix around a canonical raw-output buffer and final reconciliation so streaming matches the non-stream parser exactly.
- Assistant
The implementation now retains the exact raw model output and reconciles it with indices already streamed. This preserves incremental delivery for recognized calls while recovering split or later XML calls once, and it makes reasoning routing and request tool-selection flags irrelevant to final recovery. I’ve added regression coverage and am running the focused suite now.
- Assistant
Focused parser and postprocessor coverage passes (213 tests). I’m doing one broader streaming integration pass and a final diff review; the local environment lacks
libmlx.so, so hardware-bound route suites may remain uncollectable here.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →