[GH-ISSUE #13322] issue: Think tags not playing well with Native Tools enabled. #16884

Closed
opened 2026-04-19 22:42:58 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @ivanwong1989 on GitHub (Apr 29, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13322

Originally assigned to: @tjbck on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.5

Ollama Version (if applicable)

0.6.6

Operating System

Windows 11

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Since the model's response has has a closing tag, it should be ending the think UI and proceed with the normal response.

this happens when there are native tools included(not even called)

Actual Behavior

It seems to get stuck, even though there is a tag there.

Image

This happens when native tools are included(not even called, just included only). If there are no native tools attached, the thinking works just fine.

Steps to Reproduce

  1. Download Qwen 3 8b from Ollama
  2. Run it on OWUII
  3. Attach a tool to it, set to native tool call.
  4. The outputs the correct but seems like the UI OWUI is hanging.
  5. this is in streaming mode. If it's in non streaming mode, everything displays. (of course the think block would not collapse and remain in message if so)

Logs & Screenshots

Image

Additional Information

No response

Originally created by @ivanwong1989 on GitHub (Apr 29, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13322 Originally assigned to: @tjbck on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.5 ### Ollama Version (if applicable) 0.6.6 ### Operating System Windows 11 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Since the model's response has has a closing </think> tag, it should be ending the think UI and proceed with the normal response. this happens when there are native tools included(not even called) ### Actual Behavior It seems to get stuck, even though there is a </think> tag there. ![Image](https://github.com/user-attachments/assets/67ab7d8a-7604-4383-9da4-c00f72f79fb3) This happens when native tools are included(not even called, just included only). If there are no native tools attached, the thinking works just fine. ### Steps to Reproduce 1. Download Qwen 3 8b from Ollama 2. Run it on OWUII 3. Attach a tool to it, set to native tool call. 4. The outputs the correct <think></think> but seems like the UI OWUI is hanging. 5. this is in streaming mode. If it's in non streaming mode, everything displays. (of course the think block would not collapse and remain in message if so) ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/241a2d09-ca3b-4ba0-bc69-ebb2ed39810a) ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-19 22:42:58 -05:00
Author
Owner

@AlexRice13 commented on GitHub (Apr 29, 2025):

Same issue here, when calling Qwen3 MoE 30B-A3B trough RAGFlow API, the OpenWebUI just ignored and the thinking state last forever.

<!-- gh-comment-id:2838890215 --> @AlexRice13 commented on GitHub (Apr 29, 2025): Same issue here, when calling Qwen3 MoE 30B-A3B trough RAGFlow API, the OpenWebUI just ignored </think> and the thinking state last forever.
Author
Owner

@freezlite commented on GitHub (Apr 29, 2025):

Same issue

<!-- gh-comment-id:2840268026 --> @freezlite commented on GitHub (Apr 29, 2025): Same issue
Author
Owner

@basirsedighi commented on GitHub (Apr 30, 2025):

Same here

Image

<!-- gh-comment-id:2841134645 --> @basirsedighi commented on GitHub (Apr 30, 2025): Same here ![Image](https://github.com/user-attachments/assets/e9f054a5-cd77-406e-8f6c-4adb09255943)
Author
Owner

@criscola commented on GitHub (May 1, 2025):

looks like a bug, Qwen3 MoE 30B-A3B stays stuck in thinking phase forever to me as well, although the final response is generated eventually

<!-- gh-comment-id:2845181205 --> @criscola commented on GitHub (May 1, 2025): looks like a bug, Qwen3 MoE 30B-A3B stays stuck in thinking phase forever to me as well, although the final response is generated eventually
Author
Owner

@bgeneto commented on GitHub (May 1, 2025):

I think this is more of a Qwen3 model family issue (or how it integrates with Ollama) rather than a problem with Open-WebUI. Maybe using a better chat_template in Ollama could resolve it (I’ve tried, but it didn’t work). The model isn’t thinking forever (at least not for me), but the real issue is that it always puts answers inside thinking tags when tools are used.

NOTE: this issue title is misleading because it only happens with Qwen3 models (as far as I know) not with every model while using native tools.

<!-- gh-comment-id:2845906225 --> @bgeneto commented on GitHub (May 1, 2025): I think this is more of a Qwen3 model family issue (or how it integrates with Ollama) rather than a problem with Open-WebUI. Maybe using a better chat_template in Ollama could resolve it (I’ve tried, but it didn’t work). The model isn’t thinking forever (at least not for me), but the real issue is that it always puts answers inside thinking tags when tools are used. > NOTE: this issue title is misleading because it only happens with Qwen3 models (as far as I know) not with every model while using native tools.
Author
Owner

@basirsedighi commented on GitHub (May 2, 2025):

@bgeneto i dont think is its is a ollama issue, when functioncalling is to default it works perfectly , but when you switch it to native you see this behavor

Latest ollama and openwebui on kubernetis

Image

UPDATE: 2025-05-02
Seems like i am wrong it is acctully a Ollama problem, thanks to @tjbck for clearification

<!-- gh-comment-id:2846518958 --> @basirsedighi commented on GitHub (May 2, 2025): @bgeneto i dont think is its is a ollama issue, when functioncalling is to default it works perfectly , but when you switch it to native you see this behavor > Latest ollama and openwebui on kubernetis ![Image](https://github.com/user-attachments/assets/dac3c457-d7e7-4cdf-a6a5-c82e0afb5feb) UPDATE: 2025-05-02 Seems like i am wrong it is acctully a Ollama problem, thanks to @tjbck for clearification
Author
Owner

@tjbck commented on GitHub (May 2, 2025):

Seems to be caused by responses not being properly streamed from the Ollama-end. Investigating.

<!-- gh-comment-id:2846825137 --> @tjbck commented on GitHub (May 2, 2025): Seems to be caused by responses not being properly streamed from the Ollama-end. Investigating.
Author
Owner

@tjbck commented on GitHub (May 2, 2025):

Related: https://github.com/ollama/ollama/issues/9632

@basirsedighi It is indeed Ollama issue (tool streaming issue), with that being said, we also just addressed this edge case from our end in dev branch.

6d81eef425

<!-- gh-comment-id:2846835497 --> @tjbck commented on GitHub (May 2, 2025): Related: https://github.com/ollama/ollama/issues/9632 @basirsedighi It is indeed Ollama issue (tool streaming issue), with that being said, we also just addressed this edge case from our end in dev branch. 6d81eef425b1a602a1b6933c58ff7848acd0b9af
Author
Owner

@ivanwong1989 commented on GitHub (May 2, 2025):

Does empty content think tags also cause it to loop forever?

Image

<!-- gh-comment-id:2846863373 --> @ivanwong1989 commented on GitHub (May 2, 2025): Does empty content think tags also cause it to loop forever? ![Image](https://github.com/user-attachments/assets/1a5a27a3-098f-4ea7-8321-d16f1e819579)
Author
Owner

@ivanwong1989 commented on GitHub (May 2, 2025):

I think this is more of a Qwen3 model family issue (or how it integrates with Ollama) rather than a problem with Open-WebUI. Maybe using a better chat_template in Ollama could resolve it (I’ve tried, but it didn’t work). The model isn’t thinking forever (at least not for me), but the real issue is that it always puts answers inside thinking tags when tools are used.

NOTE: this issue title is misleading because it only happens with Qwen3 models (as far as I know) not with every model while using native tools.

Is possible it seems.

When i enable thinking for Qwen3, it tends to have BOTH thinking thoughts and response itself inside the thinking block, and forgets to enclose it ?

hmmm..

<!-- gh-comment-id:2846865349 --> @ivanwong1989 commented on GitHub (May 2, 2025): > I think this is more of a Qwen3 model family issue (or how it integrates with Ollama) rather than a problem with Open-WebUI. Maybe using a better chat_template in Ollama could resolve it (I’ve tried, but it didn’t work). The model isn’t thinking forever (at least not for me), but the real issue is that it always puts answers inside thinking tags when tools are used. > > > NOTE: this issue title is misleading because it only happens with Qwen3 models (as far as I know) not with every model while using native tools. Is possible it seems. When i enable thinking for Qwen3, it tends to have BOTH thinking thoughts and response itself inside the thinking block, and forgets to enclose it ? hmmm..
Author
Owner

@ivanwong1989 commented on GitHub (May 2, 2025):

I pulled dev docker image 5 minutes ago.

with no_think
Image

with think
Image

YEAYY!!!!! THANK YOU!!! 100 Gracias!

<!-- gh-comment-id:2846898513 --> @ivanwong1989 commented on GitHub (May 2, 2025): I pulled dev docker image 5 minutes ago. with no_think ![Image](https://github.com/user-attachments/assets/bf6b3d17-3fe3-4e10-ae9f-9ca256be20f2) with think ![Image](https://github.com/user-attachments/assets/1e3780a9-0ea9-4faf-8126-51cad6aa3c3d) YEAYY!!!!! THANK YOU!!! 100 Gracias!
Author
Owner

@freezlite commented on GitHub (May 3, 2025):

Now <think> cut and you can't see the process of thinking, if task requires multiple function calls you just seeing some response after every function call. Also function call has loading icon if you update the page even if response already done.

It would be better to see thinking process because it spends a lot of time and you have no clue whats going on at that time.

<!-- gh-comment-id:2848310244 --> @freezlite commented on GitHub (May 3, 2025): Now `<think>` cut and you can't see the process of thinking, if task requires multiple function calls you just seeing some response after every function call. Also function call has loading icon if you update the page even if response already done. It would be better to see thinking process because it spends a lot of time and you have no clue whats going on at that time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16884