[Bug] DeepSeek DSML tool-call markers leak into assistant content and streamlit UI
Author: ZhulongNTCreated Sep 10, 2026Updated Sep 10, 2026
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
Source: lsdefine/GenericAgent