Summary
When using DeepSeek with tool calls, raw DSML markers such as <‖DSML‖tool_calls> and <‖DSML‖invoke ...> are leaking into the assistant content field. Downstream consumers (UI/TUI) then display or speak these internal markers.
Suggested fix
- Add DSML marker detection before emitting
content.
- Strip / normalize Unicode variants (
‖, |, etc.).
- Keep tool-call data only in structured
tool_calls.
- Add regression tests with streaming chunks split across markers.
Reference
Summary
When using DeepSeek with tool calls, raw DSML markers such as
<‖DSML‖tool_calls>and<‖DSML‖invoke ...>are leaking into the assistantcontentfield. Downstream consumers (UI/TUI) then display or speak these internal markers.Suggested fix
content.‖,|, etc.).tool_calls.Reference