mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 06:02:06 -05:00
Markdown <think> Folding Hides Subsequent Text in Streaming Output
#3536
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 @konbakuyomu on GitHub (Feb 2, 2025).
Bug Report
Installation Method
I deployed Open WebUI using Docker Compose on Ubuntu 22.04.
Confirmation:
Expected Behavior
When a large language model’s stream output contains chain-of-thought data wrapped in
<think> ... </think>, I expect the text after</think>(i.e., the main answer content) to display correctly without being folded or “swallowed.” Ideally, the<think>section would fold neatly (e.g., using a collapsible code block or<details>), while the subsequent text remains fully visible.Actual Behavior
Currently, whenever the chain-of-thought is folded, the text after the
</think>tag appears hidden or overlapped. As a result, part of the answer that comes after the chain-of-thought is either not rendered or is truncated on the interface. The raw transmission itself seems intact, but the display causes the answer to be “swallowed.”Description
Bug Summary:
The
<think>markdown folding feature inadvertently hides or cuts off the text that follows it.This happens specifically in a streaming output scenario where the model returns something like:
Reproduction Details
Steps to Reproduce:
<think> ... </think>blocks followed by more text.<think>content but also removes or hides the subsequent text after</think>.Logs and Screenshots
Screenshots/Screen Recordings:

Additional Information
<think>with a different folding approach (e.g.,<details>), but that’s not ideal for streaming or user experience.Note
Thank you for looking into this! If any additional information or logs are needed, feel free to let me know.