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 parsing paths, then add focused regression tests for chunk boundaries, multiple calls, malformed markup, reasoning mode, and tool selection.
- Assistant
The gap is at end-of-stream: streaming only retries the configured incremental parser, while non-streaming falls back to the general XML parser. It can also emit an earlier
stopbefore that retry. I’m aligning the terminal parse path so recovery happens before the final chunk and uses the same fallback semantics. - Assistant
The focused cases now pass, including split opening tags, two recovered calls, reasoning-enabled recovery, request-level tool choice, malformed XML, and ordinary
<text. I’m running the adjacent parser and streaming suites next and checking formatting/static errors.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.