[GH-ISSUE #14157] issue: Switching models in chat does not deselect previously selected tools #32689

Closed
opened 2026-04-25 06:34:56 -05:00 by GiteaMirror · 16 comments
Owner

Originally created by @jrkropp on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14157

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

v0.6.10

Ollama Version (if applicable)

No response

Operating System

macOS Sequoia

Browser (if applicable)

Microsoft Edge

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

When selecting a model, only the tools explicitly enabled with that model should become active. Upon switching models, any previously selected tools should automatically clear.

Actual Behavior

When you select a model, tools enabled at the model level become active as intended. However when you switch to another model, these tools remain active. This is particularly noticable when switching to models that don't support tools [well].

Steps to Reproduce

  1. Select a model with associated tools (e.g., native tool calling enabled).
  2. Verify its tools become selected.
  3. Switch to a model without those tools.
  4. Notice the original tools remain incorrectly selected.

Logs & Screenshots

No visible errors in browser or Docker logs. Issue relates strictly to UI behavior.

Additional Information

src/lib/components/chat/Chat.svelte

Problematic code:

selectedToolIds = [
    ...new Set(
        [...selectedToolIds, ...(model?.info?.meta?.toolIds ?? [])].filter((id) =>
            $tools.find((t) => t.id === id)
        )
    )
];

Suggested correction:

selectedToolIds = (model?.info?.meta?.toolIds ?? []).filter((id) =>
    $tools.find((t) => t.id === id)
);

Not sure if this was an intentional decision or not. I'm happy to submit a PR or move to discussion if it was intentional. We have found users typically don't enable tools themselves so enabling tools at the model level is a much better end user experience.

Originally created by @jrkropp on GitHub (May 22, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14157 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 v0.6.10 ### Ollama Version (if applicable) _No response_ ### Operating System macOS Sequoia ### Browser (if applicable) Microsoft Edge ### 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 When selecting a model, only the tools explicitly enabled with that model should become active. Upon switching models, any previously selected tools should automatically clear. ### Actual Behavior When you select a model, tools enabled at the model level become active as intended. However when you switch to another model, these tools remain active. This is particularly noticable when switching to models that don't support tools [well]. ### Steps to Reproduce 1. Select a model with associated tools (e.g., native tool calling enabled). 3. Verify its tools become selected. 5. Switch to a model without those tools. 7. Notice the original tools remain incorrectly selected. ### Logs & Screenshots No visible errors in browser or Docker logs. Issue relates strictly to UI behavior. ### Additional Information src/lib/components/chat/Chat.svelte **Problematic code:** ``` selectedToolIds = [ ...new Set( [...selectedToolIds, ...(model?.info?.meta?.toolIds ?? [])].filter((id) => $tools.find((t) => t.id === id) ) ) ]; ``` **Suggested correction:** ``` selectedToolIds = (model?.info?.meta?.toolIds ?? []).filter((id) => $tools.find((t) => t.id === id) ); ``` Not sure if this was an intentional decision or not. I'm happy to submit a PR or move to discussion if it was intentional. We have found users typically don't enable tools themselves so enabling tools at the model level is a much better end user experience.
GiteaMirror added the testing wantedbughelp wanted labels 2026-04-25 06:34:56 -05:00
Author
Owner

@pipars commented on GitHub (May 22, 2025):

I see the same. Selecting to the model with tools, makes these tools available to all models. The issue is not "cosmetic" the tools indeed can be used by the model I switch to.

<!-- gh-comment-id:2900725306 --> @pipars commented on GitHub (May 22, 2025): I see the same. Selecting to the model with tools, makes these tools available to all models. The issue is not "cosmetic" the tools indeed can be used by the model I switch to.
Author
Owner

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

Addressed with 88a296b989

<!-- gh-comment-id:2905650964 --> @tjbck commented on GitHub (May 23, 2025): Addressed with 88a296b989f5104eab2218945c2819c42e50a566
Author
Owner

@hajiboy95 commented on GitHub (Oct 26, 2025):

@tjbck I think a part of that bug still remains.

  1. Set up 2 models with different tools attached to them within the workspace (in my case I choose the same base model, maybe it also is bugged with different ones, should be easy to test)
  2. Start conversation with one of them
  3. In the middle of the conversation (after at least 1 message) change to the other model.
  4. Seeing activated tools stays the same, e.g. it doesn't change to the tool of the other model I've just switched to.

However if you do that whole procedure at the beginning of an chat (without sending any messages), it works just fine

<!-- gh-comment-id:3448033618 --> @hajiboy95 commented on GitHub (Oct 26, 2025): @tjbck I think a part of that bug still remains. 1. Set up 2 models with different tools attached to them within the workspace (in my case I choose the same base model, maybe it also is bugged with different ones, should be easy to test) 2. Start conversation with one of them 3. In the middle of the conversation (after at least 1 message) change to the other model. 4. Seeing activated tools stays the same, e.g. it doesn't change to the tool of the other model I've just switched to. However if you do that whole procedure at the beginning of an chat (without sending any messages), it works just fine
Author
Owner

@tjbck commented on GitHub (Oct 26, 2025):

@hajiboy95 intended behaviour if you have multiple models selected at once.

<!-- gh-comment-id:3448034441 --> @tjbck commented on GitHub (Oct 26, 2025): @hajiboy95 intended behaviour if you have multiple models selected at once.
Author
Owner

@hajiboy95 commented on GitHub (Oct 26, 2025):

@tjbck thanks for the feedback. It's not that I have multiple selected. I change the selected model. Means I don't have 2 selected at once. Within the chat after a few messages I completely switch to another one. Or is that what you're referring to "multiple at once"?

<!-- gh-comment-id:3448053642 --> @hajiboy95 commented on GitHub (Oct 26, 2025): @tjbck thanks for the feedback. It's not that I have multiple selected. I change the selected model. Means I don't have 2 selected at once. Within the chat after a few messages I completely switch to another one. Or is that what you're referring to "multiple at once"?
Author
Owner

@hajiboy95 commented on GitHub (Nov 7, 2025):

@tjbck any updates on this?

<!-- gh-comment-id:3504756842 --> @hajiboy95 commented on GitHub (Nov 7, 2025): @tjbck any updates on this?
Author
Owner

@apunkt commented on GitHub (Nov 14, 2025):

I confirm the issue still exists in v0.6.36:

having two models, one model with 1 tool configured, another model with >1 tools
click "New Chat", select 1 model, don't chat, change your mind and select the other one, the tools of the previous model get assigned to the newly chosen one instead of loading the tools that are associated with the model in config.

<!-- gh-comment-id:3533707753 --> @apunkt commented on GitHub (Nov 14, 2025): I confirm the issue still exists in v0.6.36: having two models, one model with 1 tool configured, another model with >1 tools click "New Chat", select 1 model, don't chat, change your mind and select the other one, the tools of the previous model get assigned to the newly chosen one instead of loading the tools that are associated with the model in config.
Author
Owner

@hajiboy95 commented on GitHub (Nov 24, 2025):

@apunkt probably someone needs to open a new Issue for that. I'm currently a bit busy, could you do it?

<!-- gh-comment-id:3571185248 --> @hajiboy95 commented on GitHub (Nov 24, 2025): @apunkt probably someone needs to open a new Issue for that. I'm currently a bit busy, could you do it?
Author
Owner

@apunkt commented on GitHub (Nov 24, 2025):

@tjbck I kindly request to reopen this issue. It is unfortunately not solved.
Many thanks.

<!-- gh-comment-id:3571523899 --> @apunkt commented on GitHub (Nov 24, 2025): @tjbck I kindly request to reopen this issue. It is unfortunately _not_ solved. Many thanks.
Author
Owner

@silentoplayz commented on GitHub (Dec 6, 2025):

This issue appears solved to me (tested on v0.6.41, the latest dev commit). Can anyone else test and confirm please?

<!-- gh-comment-id:3620711522 --> @silentoplayz commented on GitHub (Dec 6, 2025): This issue appears solved to me (tested on v0.6.41, the latest `dev` commit). Can anyone else test and confirm please?
Author
Owner

@apunkt commented on GitHub (Dec 6, 2025):

I tested and looks good to me, too

<!-- gh-comment-id:3620833819 --> @apunkt commented on GitHub (Dec 6, 2025): I tested and looks good to me, too
Author
Owner

@hajiboy95 commented on GitHub (Dec 12, 2025):

@silentoplayz bug is still existing. Not for new chats but for already opened ones
Steps to reproduce

  1. Open a chat in which a Model with a tool attached was used
  2. See the Model in this chat has no tool attached
  3. try to switch models and see none of them has tools attached
  4. Open a new Chat and see that also here changing models doesn't really work again

Please reopen this Issue again, since it's not fully fixed

<!-- gh-comment-id:3645780129 --> @hajiboy95 commented on GitHub (Dec 12, 2025): @silentoplayz bug is still existing. Not for new chats but for already opened ones Steps to reproduce 1. Open a chat in which a Model with a tool attached was used 2. See the Model in this chat has no tool attached 3. try to switch models and see none of them has tools attached 4. Open a new Chat and see that also here changing models doesn't really work again Please reopen this Issue again, since it's not fully fixed
Author
Owner

@silentoplayz commented on GitHub (Dec 12, 2025):

@silentoplayz bug is still existing. Not for new chats but for already opened ones Steps to reproduce

1. Open a chat in which a Model with a tool attached was used

2. See the Model in this chat has no tool attached

3. try to switch models and see none of them has tools attached

4. Open a new Chat and see that also here changing models doesn't really work again

Please reopen this Issue again, since it's not fully fixed

I can reproduce the issue, but only when the tool was toggled inside the chat (not set globally on the model).
If the tool is enabled at the model level, it stays attached to that particular model, so step 2 looks “wrong” unless the tool was originally turned on only for that conversation.

Updated steps that make the problem show up every time:

  1. Start a brand-new chat.
  2. Toggle a tool inside this chat (don’t set it on the model).
  3. Send a message so the model actually uses the tool and replies.
  4. Leave the chat (open another one or reload the page).
  5. Come back to the first chat → the tool is now missing, and switching models does not bring it back.
<!-- gh-comment-id:3647999957 --> @silentoplayz commented on GitHub (Dec 12, 2025): > [@silentoplayz](https://github.com/silentoplayz) bug is still existing. Not for new chats but for already opened ones Steps to reproduce > > 1. Open a chat in which a Model with a tool attached was used > > 2. See the Model in this chat has no tool attached > > 3. try to switch models and see none of them has tools attached > > 4. Open a new Chat and see that also here changing models doesn't really work again > > > Please reopen this Issue again, since it's not fully fixed I can reproduce the issue, but only when the tool was toggled **inside the chat** (not set globally on the model). If the tool is enabled at the model level, it stays attached to that particular model, so step 2 looks “wrong” unless the tool was originally turned on **only for that conversation**. Updated steps that make the problem show up every time: 1. Start a brand-new chat. 2. Toggle a tool **inside this chat** (don’t set it on the model). 3. Send a message so the model actually *uses* the tool and replies. 4. Leave the chat (open another one or reload the page). 5. Come back to the first chat → the tool is now missing, and switching models does not bring it back.
Author
Owner

@hajiboy95 commented on GitHub (Dec 12, 2025):

@silentoplayz
I'm sorry, my explanation was a bit off.
I didn't mean models with tools attached to it in the sense of attached at the admin panel instead i was referring to models created at the workspace.

Didn't test to attach the tool direct from the admin panel since I want the same base model to have different tools attached to it under different names

e.g. Model = ChatGPT4
Model1_name = Tool1
Model2_name = Tool2

but both use the same ChatGPT4 model

<!-- gh-comment-id:3648162239 --> @hajiboy95 commented on GitHub (Dec 12, 2025): @silentoplayz I'm sorry, my explanation was a bit off. I didn't mean models with tools attached to it in the sense of attached at the admin panel instead i was referring to models created at the [`workspace`](https://docs.openwebui.com/features/workspace/models). Didn't test to attach the tool direct from the admin panel since I want the same base model to have different tools attached to it under different names e.g. Model = ChatGPT4 Model1_name = Tool1 Model2_name = Tool2 but both use the same ChatGPT4 model
Author
Owner

@silentoplayz commented on GitHub (Jan 18, 2026):

Is this issue still relevant? I don't believe my last message sent in this thread (before this one) applies anymore and seems to have been resolved.

<!-- gh-comment-id:3765029093 --> @silentoplayz commented on GitHub (Jan 18, 2026): Is this issue still relevant? I don't believe my last message sent in this thread (before this one) applies anymore and seems to have been resolved.
Author
Owner

@Classic298 commented on GitHub (Apr 15, 2026):

When you select a model, tools enabled at the model level become active as intended. However when you switch to another model, these tools remain active.

Cannot reproduce on latest

<!-- gh-comment-id:4254795455 --> @Classic298 commented on GitHub (Apr 15, 2026): > When you select a model, tools enabled at the model level become active as intended. However when you switch to another model, these tools remain active. Cannot reproduce on latest
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32689