[GH-ISSUE #8769] Display reasoning tokens in a foldable widget with a spinner/counter #102241

Closed
opened 2026-05-17 23:38:57 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @0x7CFE on GitHub (Jan 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8769

Feature Request

Is your feature request related to a problem? Please describe.

Since reasoning models are now mainstream, we are now often facing an issue of too many reasoning tokens thrown right in our face. This can flood the UI and make your laptop levitating because of coolers blasting at 100% due to UI update cycle. But the issue here is mostly about UI clutter than performance.

Describe the solution you'd like

I'd like to have a foldable reasoning tokens widget in OpenWebUI, much like in other UIs (see below)

Describe alternatives you've considered

  • Do nothing.
  • Use another UI.

Additional context

This is how it's implemented in https://chat.deepseek.com

Collapsed:
Image

Expanded:
Image

Originally created by @0x7CFE on GitHub (Jan 22, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8769 # Feature Request **Is your feature request related to a problem? Please describe.** Since reasoning models are now mainstream, we are now often facing an issue of too many reasoning tokens thrown right in our face. This can flood the UI and make your laptop levitating because of coolers blasting at 100% due to UI update cycle. But the issue here is mostly about UI clutter than performance. **Describe the solution you'd like** I'd like to have a foldable reasoning tokens widget in OpenWebUI, much like in other UIs (see below) **Describe alternatives you've considered** - Do nothing. - Use another UI. **Additional context** This is how it's implemented in https://chat.deepseek.com Collapsed: ![Image](https://github.com/user-attachments/assets/070a6cd7-b031-4fd8-979d-bd0de8dad7c3) Expanded: ![Image](https://github.com/user-attachments/assets/a938cd63-e4cf-40b5-9032-b72e70a4b860)
Author
Owner

@silentoplayz commented on GitHub (Jan 22, 2025):

Addressed in the latest version released - https://github.com/open-webui/open-webui/releases/tag/v0.5.5

<!-- gh-comment-id:2608173414 --> @silentoplayz commented on GitHub (Jan 22, 2025): Addressed in the latest version released - https://github.com/open-webui/open-webui/releases/tag/v0.5.5
Author
Owner

@0x7CFE commented on GitHub (Jan 22, 2025):

Wow, that was the fastest turnaround time for any issue I ever reported 😅 Yay to OpenWebUI! 🎉

<!-- gh-comment-id:2608175312 --> @0x7CFE commented on GitHub (Jan 22, 2025): Wow, that was the fastest turnaround time for any issue I ever reported 😅 Yay to OpenWebUI! 🎉
Author
Owner

@konczdev commented on GitHub (Jan 23, 2025):

@silentoplayz Doesn't work with deepseek api. The reasoning content is separated in the response. See reasoning_content api-docs.deepseek.com

<!-- gh-comment-id:2609368203 --> @konczdev commented on GitHub (Jan 23, 2025): @silentoplayz Doesn't work with deepseek api. The reasoning content is separated in the response. See reasoning_content [api-docs.deepseek.com](https://api-docs.deepseek.com/guides/reasoning_model)
Author
Owner

@silentoplayz commented on GitHub (Jan 23, 2025):

@silentoplayz Doesn't work with deepseek api. The reasoning content is separated in the response. See reasoning_content api-docs.deepseek.com

See the latest Open WebUI changelog: https://github.com/open-webui/open-webui/releases/tag/v0.5.6

<!-- gh-comment-id:2610265649 --> @silentoplayz commented on GitHub (Jan 23, 2025): > [@silentoplayz](https://github.com/silentoplayz) Doesn't work with deepseek api. The reasoning content is separated in the response. See reasoning_content [api-docs.deepseek.com](https://api-docs.deepseek.com/guides/reasoning_model) See the latest Open WebUI changelog: https://github.com/open-webui/open-webui/releases/tag/v0.5.6
Author
Owner

@konczdev commented on GitHub (Jan 23, 2025):

@silentoplayz You think I didn't test before commenting on a closed issue? I explained the root cause too. Yes, it works with distilled models since the tag is part of the content in the response. However, the official DeepSeek API is different. Example from their api docs:

from openai import OpenAI
client = OpenAI(api_key="<DeepSeek API Key>", base_url="https://api.deepseek.com")

# Round 1
messages = [{"role": "user", "content": "9.11 and 9.8, which is greater?"}]
response = client.chat.completions.create(
    model="deepseek-reasoner",
    messages=messages,
    stream=True
)

reasoning_content = ""
content = ""

for chunk in response:
    if chunk.choices[0].delta.reasoning_content:
        reasoning_content += chunk.choices[0].delta.reasoning_content
    else:
        content += chunk.choices[0].delta.content

# Round 2
messages.append({"role": "assistant", "content": content})
messages.append({'role': 'user', 'content': "How many Rs are there in the word 'strawberry'?"})
response = client.chat.completions.create(
    model="deepseek-reasoner",
    messages=messages,
    stream=True
)

Image

<!-- gh-comment-id:2610432311 --> @konczdev commented on GitHub (Jan 23, 2025): @silentoplayz You think I didn't test before commenting on a closed issue? I explained the root cause too. Yes, it works with distilled models since the <think> tag is part of the content in the response. However, the official DeepSeek API is different. Example from their api docs: ```python from openai import OpenAI client = OpenAI(api_key="<DeepSeek API Key>", base_url="https://api.deepseek.com") # Round 1 messages = [{"role": "user", "content": "9.11 and 9.8, which is greater?"}] response = client.chat.completions.create( model="deepseek-reasoner", messages=messages, stream=True ) reasoning_content = "" content = "" for chunk in response: if chunk.choices[0].delta.reasoning_content: reasoning_content += chunk.choices[0].delta.reasoning_content else: content += chunk.choices[0].delta.content # Round 2 messages.append({"role": "assistant", "content": content}) messages.append({'role': 'user', 'content': "How many Rs are there in the word 'strawberry'?"}) response = client.chat.completions.create( model="deepseek-reasoner", messages=messages, stream=True ) ``` ![Image](https://github.com/user-attachments/assets/b6bf38bc-b0f5-4f97-8fc0-56407dd7d4bb)
Author
Owner

@bgeneto commented on GitHub (Jan 23, 2025):

Confirmed. Works on distilled deepseek models but not with the official 'deepseek-reasoner' api model.

<!-- gh-comment-id:2610891892 --> @bgeneto commented on GitHub (Jan 23, 2025): Confirmed. Works on distilled deepseek models but not with the official 'deepseek-reasoner' api model.
Author
Owner

@TheLocalLab commented on GitHub (Jan 26, 2025):

I can also confirm that the deepseek reasoner api model isn't displaying the "thought" process but the local distilled models are.

<!-- gh-comment-id:2614232610 --> @TheLocalLab commented on GitHub (Jan 26, 2025): I can also confirm that the deepseek reasoner api model isn't displaying the "thought" process but the local distilled models are.
Author
Owner

@Yundin commented on GitHub (Jan 26, 2025):

Seems like there won't be an official support of this feature in the current state of DeepSeek API because its json differs from OpenAI API specs: https://github.com/open-webui/open-webui/issues/8749#issuecomment-2608126791

However it can be achieved by Pipe functions. This one imitates <think></think> block from a local model and does the job for me: https://openwebui.com/f/zgccrui/deepseek_r1

<!-- gh-comment-id:2614488444 --> @Yundin commented on GitHub (Jan 26, 2025): Seems like there won't be an official support of this feature in the current state of DeepSeek API because its json differs from OpenAI API specs: https://github.com/open-webui/open-webui/issues/8749#issuecomment-2608126791 However it can be achieved by Pipe functions. This one imitates `<think></think>` block from a local model and does the job for me: https://openwebui.com/f/zgccrui/deepseek_r1
Author
Owner

@garymoon commented on GitHub (Jan 27, 2025):

Would be good to communicate this caveat more prominently so we don't get confused thinking things are broken or we need to fix something 💙

<!-- gh-comment-id:2614737902 --> @garymoon commented on GitHub (Jan 27, 2025): Would be good to communicate this caveat more prominently so we don't get confused thinking things are broken or we need to fix something 💙
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#102241