Description
When using a third-party OpenAI-compatible API provider, the streaming response contains reasoning_content fields that cause severe display corruption in deepseek-tui. Each token is rendered as a separate "thinking" block instead of normal text output.
Steps to reproduce
- Configure deepseek-tui with an OpenAI-compatible third-party provider:
provider = "openai"
model = "deepseek-v4-flash"
verify_ssl = false
[providers.openai]
base_url = "http://<third-party-api>/v1"
api_key = "<third-party-key>"
model = "deepseek-v4-flash"
- Set
DEEPSEEK_ALLOW_INSECURE_HTTP=1 and launch deepseek-tui
- Send any message (e.g. "你好")
Expected behavior
The response text should be rendered normally as a continuous text block, like:
Actual behavior
The response is broken into individual tokens, each preceded by a thinking done · 0.0s block:
thinking done · 0.0s
Full reasoning in Ctrl+O
thinking done · 0.0s
Full reasoning in Ctrl+O
thinking done · 0.0s
...
你好
。
有什么
需要
帮忙
的
?
The reasoning_content field in the streaming SSE chunks triggers the thinking/reasoning UI for every single chunk, even when the actual content is just normal text tokens.
Impact
This makes deepseek-tui completely unusable with any third-party OpenAI-compatible API that returns DeepSeek models' reasoning_content field. The display is so corrupted that the tool cannot be used for any practical work.
Workaround attempts:
- Local proxy filtering
reasoning_content from SSE chunks: causes compatibility issues with deepseek-tui's SSE client (no output or further format issues)
- No workaround currently available
Environment
- OS: Windows 11 Pro
- DeepSeek CLI version: installed via npm (deepseek-tui package)
Description
When using a third-party OpenAI-compatible API provider, the streaming response contains
reasoning_contentfields that cause severe display corruption in deepseek-tui. Each token is rendered as a separate "thinking" block instead of normal text output.Steps to reproduce
DEEPSEEK_ALLOW_INSECURE_HTTP=1and launchdeepseek-tuiExpected behavior
The response text should be rendered normally as a continuous text block, like:
Actual behavior
The response is broken into individual tokens, each preceded by a
thinking done · 0.0sblock:The
reasoning_contentfield in the streaming SSE chunks triggers the thinking/reasoning UI for every single chunk, even when the actual content is just normal text tokens.Impact
This makes deepseek-tui completely unusable with any third-party OpenAI-compatible API that returns DeepSeek models'
reasoning_contentfield. The display is so corrupted that the tool cannot be used for any practical work.Workaround attempts:
reasoning_contentfrom SSE chunks: causes compatibility issues with deepseek-tui's SSE client (no output or further format issues)Environment