mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #23923] feat: Expose Ollama reasoning (thinking) as <think> tags in OpenAI-compat SSE for generic clients #35639
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pvyswiss on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23923
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@tjbck commented on GitHub (Apr 24, 2026):
Open to discussion.