feat: Don't render <think> block then model is explaining code block. #4474

Closed
opened 2025-11-11 15:54:59 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @olek-osikowicz on GitHub (Mar 18, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

When clicking on a code block, there is an option to ask model to explain it.
Then the thinking model, is just streaming raw response with <think></think> tags.
See the current behaviour below:

https://github.com/user-attachments/assets/e7c6bf32-10bb-40c7-8d8a-5b62a767f1ad

Desired Solution you'd like

I believe the correct solution would be collapsing the thinking with <details> tag, as it is currently done in regular chat:

Image

Additional Context

Tested using:

  • deepseek-r1-32b
  • Open-WebUI v0.5.20
Originally created by @olek-osikowicz on GitHub (Mar 18, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description When clicking on a code block, there is an option to ask model to explain it. Then the thinking model, is just streaming raw response with `<think></think>` tags. See the current behaviour below: https://github.com/user-attachments/assets/e7c6bf32-10bb-40c7-8d8a-5b62a767f1ad ### Desired Solution you'd like I believe the correct solution would be collapsing the thinking with `<details>` tag, as it is currently done in regular chat: ![Image](https://github.com/user-attachments/assets/cd73e2b6-4fd9-44f5-b5db-0dc496187ce5) ### Additional Context Tested using: - deepseek-r1-32b - Open-WebUI v0.5.20
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4474