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 divergence and add focused regression tests for chunk splits, multiple calls, malformed text, reasoning mode, and tool selection.
- Assistant
The divergence is at end-of-stream recovery: streaming only retries the configured parser, while non-streaming then falls back to the shared tolerant parser. Split XML can also be lost by reasoning routing, and a deferred malformed tag can swallow the terminal
stop. I’m aligning those paths around the full raw output and preserving a terminal finish event when recovery finds nothing. - Assistant
The focused regressions now pass, including character-boundary XML splitting, two recovered calls under reasoning, schema coercion with an explicit tool choice, and malformed/plain-text termination. I’m checking formatting and the broader parser/postprocessor suites next.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.