mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #24697] issue: reasoning_content from vLLM streaming dropped after first thinking block #123692
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 @brandons209 on GitHub (May 14, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24697
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.9.5
Ollama Version (if applicable)
I am using vLLM version 0.20.2 proxied through LiteLLM
Operating System
Ubuntu 24.04.4 LTS
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When a vLLM upstream returns a streaming response containing both delta.reasoning_content chunks (from --reasoning-parser qwen3, tested with qwen3.6-27b) and subsequent delta.content chunks ending with finish_reason: "stop", Open WebUI should:
Render the reasoning content in a collapsible "Thinking" section above the final answer.
Render the subsequent content chunks as the visible final answer below the thinking section.
Persist both fields correctly to the chat record for multi-turn continuity.
Actual Behavior
Only the "Thinking" section renders. The subsequent content chunks are dropped by Open WebUI's frontend stream reconciliation, they never appear as an answer nor does the model continue with the next turn / tool call. This occurs both in API requests and using the chat interface.
The raw stream from LiteLLM contains both phases correctly (verified with curl directly against LiteLLM). The bug is purely in Open WebUI's handling of the separated reasoning_content + content stream from vLLM.
This is essentially the same symptom class as closed issue #23173 and open issue #24295, but specifically for the vLLM --reasoning-parser qwen3. Discussion #23895 has multiple users confirming the Provider: llama.cpp connection-dropdown workaround does not apply to vLLM upstreams (which I confirmed myself as well.)
Steps to Reproduce
Tested on a Ubuntu Server 24.04 with two RTX 3090s, but should reproduce on any vLLM 0.20+ deployment serving any Qwen3.6 model.
Deploy vLLM 0.20.2 serving any Qwen3.6 family model (tested with
Qwen/Qwen3.6-27B-FP8).Launch vLLM with the Qwen3 reasoning parser so reasoning is split out of
content:(Optional) Put LiteLLM in front of vLLM with this entry in
config.yaml:Restart LiteLLM. Do not set
merge_reasoning_content_in_choices: truefor this repro.In Open WebUI v0.9.5, configure a Connection to the LiteLLM endpoint:
http://litellm:4000/v1llama.cppdoes not help vLLM upstreams, per discussion #23895)Verify the stream is correctly shaped by hitting LiteLLM directly:
Expected (and what I actually see): a sequence of chunks like:
Both phases are present,
finish_reason: stop.In the Open WebUI chat UI, select the
qwen3.6-27bmodel and send:What is 2+2? Be brief.Observe: the UI shows a "Thinking" section that fills in correctly, then renders nothing else after thinking finishes. The expected answer (
4) never appears. No error is visible to the user.Inspect the rendered chat record:
The assistant message has populated reasoning but
contentis empty or missing.Logs & Screenshots
Response from model in open-webui:
Open WebUI Logs:
open-webui | 2026-05-13 20:00:16.483 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 23.234.111.26:0 - "POST /api/v1/chats/f9bbbd19-2f29-49bb-8363-53cc298d6077 HTTP/1.1" 200
open-webui | 2026-05-13 20:00:19.384 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.0.169:57274 - "GET / HTTP/1.1" 200
open-webui | 2026-05-13 20:00:19.724 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 23.234.111.26:0 - "GET /api/v1/terminals/open-terminal/ports HTTP/1.1" 200
open-webui | 2026-05-13 20:00:23.277 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 23.234.111.26:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
open-webui | 2026-05-13 20:00:24.388 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.0.169:35074 - "GET / HTTP/1.1" 200
Correct output from LiteLLM proxying the vLLM endpoint:
Additional Information
According the the Qwen3.6 models official docs, the opening tag for reasoning is pre-filled by the chat template, the model will only output the closing tag, so the workaround of injecting the reasoning content directly into the content key instead of the separate reasoning_content also will not work since open-webui will see the ending think tag and stop prematurely.
Workarounds I tried:
merge_reasoning_content_in_choices: truein LiteLLM per their tutorial</think>as literal text because the prompt-injected opening tag is stripped from output (Qwen3.6+ template behavior). I see more of the content but it still stops prematurelyllama.cpp--reasoning-parser qwen3so vLLM emits raw thinking blocksmessage.contentdirectly via the API (bypassing the UI renderer)@owui-terminator[bot] commented on GitHub (May 14, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #23173 issue: After native tool calls, streaming reasoning_content is truncated to the first token in the UI
Very similar stream-reconciliation bug: Open WebUI mishandles streamed
reasoning_contentafter the first segment, causing the reasoning/final-answer split to break in the UI. Your report differs in that the finalcontentis dropped after the thinking block, but it’s clearly the closest prior symptom class.by ianustec ·
bug🟢 #24295 issue: Reasoning UI shows "Thought for less than a second" too early while streamed reasoning/tool execution is still running (LiteLLM Responses API + Azure OpenAI)
Open issue about reasoning UI state with LiteLLM/OpenAI-compatible reasoning streams. It’s not the exact same failure mode, but it involves the same Open WebUI reasoning pipeline and LiteLLM proxying behavior.
by DediCATeD88 ·
bug🟣 #23879 issue: reasoning_content is ignored in non-stream openai API
Closed issue showing Open WebUI’s OpenAI-compatible handling of
reasoning_contentcan be wrong in non-streaming mode. This supports that the same parsing/rendering path aroundreasoning_contenthas had related bugs.by vanmilleru ·
bug🟣 #18058 issue: handle thinking for Qwen3-VL models
Older vLLM/Qwen thinking-handling issue in Open WebUI. It’s about Qwen3-VL/vLLM reasoning not being rendered in the correct place, so it’s relevant as an upstream/provider-specific precedent.
by SlavikCA ·
bug🟣 #23175 Issue #23175
Related multi-turn/tool-call bug where
reasoning_contentis stripped from assistant messages, breaking follow-up turns. Your issue also affects persistence of reasoning vs content across turns, so this is adjacent and useful context.by unknown
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@brandons209 commented on GitHub (May 14, 2026):
All the call signs seemed to point to this issue, but I looked over the fact that I was using the wrong tool parser in vLLM. When I saw the logs from the request it looked right but actually wasn't being parsed properly. Closing the issue, double check your configs against model cards!
@j820301 commented on GitHub (May 15, 2026):
Hello, I would like to ask how to enable thought mode in vLLM? I am currently using vLLM gemma4:26b-it and don't see any thinking process.
openwebui how setting?
services:
vllm:
image: vllm/vllm-openai:v0.20.2
container_name: vllm
runtime: nvidia
restart: unless-stopped
ports:
- "8888:8000"
volumes:
- ./.cache/huggingface:/root/.cache/huggingface
ipc: host
shm_size: 16gb
command: >
--model google/gemma-4-26B-A4B-it
--tensor-parallel-size 1
--trust-remote-code
--max-num-seqs 32
--enforce-eager
--kv-cache-dtype fp8
--enable-auto-tool-choice
--reasoning-parser gemma4
--tool-call-parser gemma4
--host 0.0.0.0
--port 8000
--gpu-memory-utilization 0.95
--max-model-len 131072