Feature Request
Ollama reasoning models (DeepSeek R1, Gemma 4) send reasoning in message.thinking. Open WebUI converts this to delta.reasoning_content -- a non-standard field that only DeepSeek-specific SDKs understand.
Generic OpenAI-compatible SDKs (@ai-sdk/openai-compatible, etc.) don't recognize reasoning_content and silently drop reasoning tokens.
Related to: #23917 (Bug 4)
Suggested Enhancement
Convert Ollama's thinking field into <think> tags inside the standard content field:
if reasoning_content:
if not in_reasoning:
in_reasoning = True
message_content = "<think>\n" + reasoning_content
else:
message_content = reasoning_content
reasoning_content = None
elif in_reasoning and message_content:
in_reasoning = False
message_content = "\n</think>\n\n" + message_content
Open WebUI's browser middleware already detects <think> tags and renders them as collapsible blocks -- fully backward-compatible.
Impact
- Web UI:
<think> tags rendered as collapsible reasoning (same as before)
- API clients: Reasoning visible as standard content text
File
backend/open_webui/utils/response.py
Feature Request
Ollama reasoning models (DeepSeek R1, Gemma 4) send reasoning in
message.thinking. Open WebUI converts this todelta.reasoning_content-- a non-standard field that only DeepSeek-specific SDKs understand.Generic OpenAI-compatible SDKs (
@ai-sdk/openai-compatible, etc.) don't recognizereasoning_contentand silently drop reasoning tokens.Related to: #23917 (Bug 4)
Suggested Enhancement
Convert Ollama's
thinkingfield into<think>tags inside the standardcontentfield:Open WebUI's browser middleware already detects
<think>tags and renders them as collapsible blocks -- fully backward-compatible.Impact
<think>tags rendered as collapsible reasoning (same as before)File
backend/open_webui/utils/response.py