mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[GH-ISSUE #20231] issue: Non-streaming responses with thinking enabled are not parsed correctly (thinking content merged into final answer) #106128
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 @hamid370 on GitHub (Dec 29, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20231
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
latest
Ollama Version (if applicable)
No response
Operating System
ubuntu
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Bug description
When using OpenWebUI with models that support thinking / reasoning output (e.g.
<think>...</think>blocks), non-streaming responses (stream: false) are not parsed correctly.Instead of separating the thinking section from the final answer, OpenWebUI treats the entire response — including the
<think>...</think>block — as the final visible answer.This results in internal reasoning content being shown directly to the user.
Expected behavior
When
thinking(or reasoning mode) is enabled and the request is sent withstream: false:<think>...</think>block should be recognized and extracted</think>) should be displayed as the assistant’s responseReproduction steps
Enable a model that outputs reasoning in
<think>...</think>formatEnable thinking / reasoning in model or UI settings
Send a request with:
stream: falseObserve that OpenWebUI displays the entire response including
<think>contentEnvironment
stream: false)<think>...</think>reasoning blocks/v1/chat/completions)Notes / suspicion
This appears to be a parsing issue specific to non-streaming responses.
In streaming mode, reasoning/thinking blocks are usually handled token-by-token, but in non-streaming mode the final text is not post-processed to separate
<think>content from the actual assistant answer.A post-processing step for non-stream responses that strips or separates
<think>...</think>blocks would resolve this.Related behavior
Streaming responses may already handle reasoning tokens correctly
Issue only occurs when:
thinkingis enabledstream: falseis usedActual Behavior
Repository:
open-webui/open-webuiWhere to post: GitHub → Issues → New issue → Bug report
Title
Non-streaming responses with
thinkingenabled are not parsed correctly (thinking content merged into final answer)Bug description
When using OpenWebUI with models that support thinking / reasoning output (e.g.
<think>...</think>blocks), non-streaming responses (stream: false) are not parsed correctly.Instead of separating the thinking section from the final answer, OpenWebUI treats the entire response — including the
<think>...</think>block — as the final visible answer.This results in internal reasoning content being shown directly to the user.
Expected behavior
When
thinking(or reasoning mode) is enabled and the request is sent withstream: false:<think>...</think>block should be recognized and extracted</think>) should be displayed as the assistant’s responseActual behavior
For non-streaming requests with
thinkingenabled:<think>...</think>sectionExample of what OpenWebUI currently displays:
Expected output (conceptually)
Reproduction steps
Enable a model that outputs reasoning in
<think>...</think>formatEnable thinking / reasoning in model or UI settings
Send a request with:
stream: falseObserve that OpenWebUI displays the entire response including
<think>contentEnvironment
stream: false)<think>...</think>reasoning blocks/v1/chat/completions)Notes / suspicion
This appears to be a parsing issue specific to non-streaming responses.
In streaming mode, reasoning/thinking blocks are usually handled token-by-token, but in non-streaming mode the final text is not post-processed to separate
<think>content from the actual assistant answer.A post-processing step for non-stream responses that strips or separates
<think>...</think>blocks would resolve this.Related behavior
Streaming responses may already handle reasoning tokens correctly
Issue only occurs when:
thinkingis enabledstream: falseis usedSteps to Reproduce
Steps to Reproduce
Prerequisites
OpenWebUI running
OpenWebUI must be installed and running (Docker or bare-metal).
You must be able to access the UI from a browser.
An OpenAI-compatible upstream that returns ... in the assistant content
Any OpenAI-compatible API works as long as the final assistant message contains a ... block followed by the final answer text.
Example models: Qwen3 (thinking enabled), DeepSeek-style reasoning models, or any model configured to emit blocks.
Streaming must be disabled for the test request
The request must be sent as non-streaming (stream: false).
Logs & Screenshots
.
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Dec 29, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19861 issue:
by QuitHub • Dec 10, 2025 •
bug#19877 issue:
by dotmobo • Dec 11, 2025 •
bug#19738 issue: Thinking models render responses inside thinking UI when using native tools
by qq3829596922 • Dec 04, 2025 •
bug#20019 issue:
by j63440490 • Dec 17, 2025 •
bug#19777 issue:
by Yaute7 • Dec 05, 2025 •
bugShow 5 more related issues
#20092 issue:
by VideoRyan • Dec 22, 2025 •
bug#20046 issue:
by pierrelouisbescond • Dec 19, 2025 •
bug#20155 issue:
by dhaern • Dec 24, 2025 •
bug#20059 issue: Chat response is not working
by navilg • Dec 20, 2025 •
bug#20107 issue:
by mengdeer589 • Dec 22, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@tjbck commented on GitHub (Dec 30, 2025):
Intended behaviour.
@DefinitlyEvil commented on GitHub (Jan 4, 2026):
So this is intended but no one is pointing to a resolution? I used
--reasoning-parser 'qwen3'(trieddeepseek_v3as well) it did not work as it should. Changing chat template is not optimal.Edit: Use
--reasoning-parser deepseek_r1.