mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #16435] issue: Qwen3 and Qwen3-Coder output sometimes causes formatting of code sections in UI to go very wrong #17903
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 @xkmire on GitHub (Aug 10, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16435
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.18 (latest)
Ollama Version (if applicable)
latest llama.cpp
Operating System
Ubuntu 25.04
Browser (if applicable)
Google chrome
Confirmation
README.md.Expected Behavior
When Qwen3 outputs a code segment, I expect the code segment to look like code, even if there are some markdown formated text blocks coming after.
Actual Behavior
When Qwen3 outputs code, there is sometimes (quite frequently) some markdown text after. When that text is rendered in the UI the code block becomes completely unreadable in a big font without line breaks.
In the example below, the first code block gets broken in the UI, but the second looks great:
Here's your Go code converted into a well-formatted, readable, and commented version for better understanding:
Notes:
data: {...}ordata: [DONE].StreamChunkis a struct defined elsewhere, likely like:wparameter is anio.Writer(e.g.,os.Stdout, a buffer, etc.).Let me know if you'd like the full struct definitions or error handling improvements!
Steps to Reproduce
(In this case, I think the only important part is the open webui version and maybe the browser)
Logs & Screenshots
Additional Information
No response
@tjbck commented on GitHub (Aug 10, 2025):
Model dependent behaviour, could you confirm this isn't a model response issue?