[GH-ISSUE #24839] feat: Add toggle to strip thinking tags from displayed output #107403

Closed
opened 2026-05-18 06:12:41 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @fuleinist on GitHub (May 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24839

Problem Description

Models like Qwen3 and DeepSeek-R1 output thinking tokens wrapped in <think> tags. These tags are useful for developers but clutter the chat display for regular users, showing raw XML-like markup in the message body.

Desired Solution

Add a per-user or global toggle (e.g., in the model settings or interface preferences) that strips <think>...</think> blocks from the displayed output before rendering in the chat UI. The raw response could still be accessible via a "Show thinking" toggle or stored in message metadata.

This would give users the choice: see clean output, or see the full model reasoning.

Alternatives Considered

  • Stripping globally — not ideal as developers/debuggers may need the full output
  • Adding it as a model-specific flag — would require per-model configuration for each model that uses thinking tags
  • Displaying thinking in a collapsible section — adds UI complexity

Additional Context

Issue #23339 mentions disabling reinjecting thinking into prompts. This feature is complementary — it controls what the user sees, not what gets sent to the model.

This should be a simple UI toggle with a default of false (show thinking tags as-is). When enabled, the frontend filters out the tags before rendering.

Originally created by @fuleinist on GitHub (May 17, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24839 ## Problem Description Models like Qwen3 and DeepSeek-R1 output thinking tokens wrapped in `<think>` tags. These tags are useful for developers but clutter the chat display for regular users, showing raw XML-like markup in the message body. ## Desired Solution Add a per-user or global toggle (e.g., in the model settings or interface preferences) that strips `<think>...</think>` blocks from the displayed output before rendering in the chat UI. The raw response could still be accessible via a "Show thinking" toggle or stored in message metadata. This would give users the choice: see clean output, or see the full model reasoning. ## Alternatives Considered - Stripping globally — not ideal as developers/debuggers may need the full output - Adding it as a model-specific flag — would require per-model configuration for each model that uses thinking tags - Displaying thinking in a collapsible section — adds UI complexity ## Additional Context Issue #23339 mentions disabling reinjecting thinking into prompts. This feature is complementary — it controls what the user sees, not what gets sent to the model. This should be a simple UI toggle with a default of `false` (show thinking tags as-is). When enabled, the frontend filters out the tags before rendering.
Author
Owner

@owui-terminator[bot] commented on GitHub (May 17, 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:

  1. 🟣 #24537 issue: Reasoning tags are displayed as raw output for Gemini 3 Flash via LiteLLM
    This reports the same user-facing problem: reasoning/think tags are ending up visible as raw text in the chat output instead of being hidden or rendered as reasoning UI. It is a close match to the display-toggle request, even though it focuses on Gemini via LiteLLM.
    by arnoulddw

  2. 🟢 #24635 issue:

    tag not rendered, displayed as raw text
    This is directly about reasoning markup being shown as raw text in the chat UI, but with <details type="reasoning"> instead of <think> tags. It is closely related because both concern how reasoning blocks are rendered to the user.
    by siriusa51

  3. 🟣 #7398 Feat: show/hide 's for new CoT-finetuned models
    This older feature request asks for a show/hide control for reasoning output in the UI, which is conceptually very similar to the requested toggle to strip <think> tags from displayed output. The tag format differs, but the feature need is essentially the same.
    by philogicae

  4. 🟢 #23339 feat: Add model-level toggle to disable reinjecting reasoning/thinking into prompts (prevents tag imitation and rendering/parsing failures)
    This open issue is complementary and closely adjacent: it addresses reasoning/thinking being reinjected into prompts and causing tag imitation and rendering failures. While it targets prompt history rather than display, it involves the same <think> handling pipeline.
    by ShirasawaSama

  5. 🟣 #16930 enh: think tag parsing
    This closed issue is specifically about think-tag parsing, which is part of the same rendering path needed to hide or strip <think> blocks correctly. It is relevant as prior work on the underlying tag-handling behavior.
    by tjbck


💡 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.

<!-- gh-comment-id:4470927841 --> @owui-terminator[bot] commented on GitHub (May 17, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#24537](https://github.com/open-webui/open-webui/issues/24537) **issue: Reasoning tags are displayed as raw output for Gemini 3 Flash via LiteLLM** *This reports the same user-facing problem: reasoning/think tags are ending up visible as raw text in the chat output instead of being hidden or rendered as reasoning UI. It is a close match to the display-toggle request, even though it focuses on Gemini via LiteLLM.* *by arnoulddw* 2. 🟢 [#24635](https://github.com/open-webui/open-webui/issues/24635) **issue: <details type="reasoning"> tag not rendered, displayed as raw text** *This is directly about reasoning markup being shown as raw text in the chat UI, but with `<details type="reasoning">` instead of `<think>` tags. It is closely related because both concern how reasoning blocks are rendered to the user.* *by siriusa51* 3. 🟣 [#7398](https://github.com/open-webui/open-webui/issues/7398) **Feat: show/hide <Thought>'s for new CoT-finetuned models** *This older feature request asks for a show/hide control for reasoning output in the UI, which is conceptually very similar to the requested toggle to strip `<think>` tags from displayed output. The tag format differs, but the feature need is essentially the same.* *by philogicae* 4. 🟢 [#23339](https://github.com/open-webui/open-webui/issues/23339) **feat: Add model-level toggle to disable reinjecting reasoning/thinking into prompts (prevents <think> tag imitation and rendering/parsing failures)** *This open issue is complementary and closely adjacent: it addresses reasoning/thinking being reinjected into prompts and causing tag imitation and rendering failures. While it targets prompt history rather than display, it involves the same `<think>` handling pipeline.* *by ShirasawaSama* 5. 🟣 [#16930](https://github.com/open-webui/open-webui/issues/16930) **enh: think tag parsing** *This closed issue is specifically about think-tag parsing, which is part of the same rendering path needed to hide or strip `<think>` blocks correctly. It is relevant as prior work on the underlying tag-handling behavior.* *by tjbck* --- 💡 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.
Author
Owner

@frenzybiscuit commented on GitHub (May 17, 2026):

You should still be able to do this via filter (I believe).

Meanwhile, how do you want the end user to know the model is thinking instead of just stalled out / not responding to them?

<!-- gh-comment-id:4471269346 --> @frenzybiscuit commented on GitHub (May 17, 2026): You should still be able to do this via filter (I believe). Meanwhile, how do you want the end user to know the model is thinking instead of just stalled out / not responding to them?
Author
Owner

@Classic298 commented on GitHub (May 17, 2026):

The raw response could still be accessible via a "Show thinking" toggle

Thats exactly the default behaviour of open webui. it consolidates thinking into a thinking section that is collapsed by default

Add a per-user or global toggle (e.g., in the model settings or interface preferences) that strips ... blocks from the displayed output before rendering in the chat UI.

already exists in interface settings

<!-- gh-comment-id:4471396786 --> @Classic298 commented on GitHub (May 17, 2026): > The raw response could still be accessible via a "Show thinking" toggle Thats exactly the default behaviour of open webui. it consolidates thinking into a thinking section that is collapsed by default > Add a per-user or global toggle (e.g., in the model settings or interface preferences) that strips <think>...</think> blocks from the displayed output before rendering in the chat UI. already exists in interface settings
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#107403