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
Now let me look at the existing tests to understand expected behavior:
- Assistant
Let me check where the postprocessor is used and look at recent history around this area:
- Assistant
Let me verify the gap with a quick repro:
- Assistant
Now the finalize() generic recovery:
- Assistant
Now verify the repro passes:
- Assistant
All scenarios recover correctly. Now run the existing test suites to check for regressions:
- Assistant
The two MLX-dependent test files can't run on this Linux box. Let me verify their logic manually — first check the sentinel format in the spec test:
- Assistant
Let me verify behavior with a real configured parser (hermes) receiving a non-canonical XML format, including exception safety:
- Assistant
All working. Now add regression tests to
tests/test_postprocessor.py: - Assistant
Pre-existing environmental failures (
libmlx.somissing on this Linux box) — identical on the clean tree. Let me run lint checks on the changed files: - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.