[PR #22307] [CLOSED] fix: Clear selected tools when switching models #42234

Closed
opened 2026-04-25 14:13:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22307
Author: @fskeung
Created: 3/6/2026
Status: Closed

Base: mainHead: fix/clear-tools-on-model-switch


📝 Commits (1)

  • 426b314 fix: Clear selected tools when switching models

📊 Changes

1 file changed (+2 additions, -3 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+2 -3)

📄 Description

Summary

When user switches to a model without default toolIds, the previously selected tools should be cleared instead of being retained.

Changes

  • Modified src/lib/components/chat/Chat.svelte
  • When a model doesn't have default toolIds, selectedToolIds is now set to empty array instead of keeping old tools

Issue

Fixes #14157 - Switching models does not deselect previously selected tools

Testing

Manual testing recommended:

  1. Select some tools with model A
  2. Switch to model B (one without default tools)
  3. Verify tools are deselected

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22307 **Author:** [@fskeung](https://github.com/fskeung) **Created:** 3/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/clear-tools-on-model-switch` --- ### 📝 Commits (1) - [`426b314`](https://github.com/open-webui/open-webui/commit/426b314330cd0e35b87308376cf0258176c57045) fix: Clear selected tools when switching models ### 📊 Changes **1 file changed** (+2 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+2 -3) </details> ### 📄 Description ## Summary When user switches to a model without default toolIds, the previously selected tools should be cleared instead of being retained. ## Changes - Modified `src/lib/components/chat/Chat.svelte` - When a model doesn't have default toolIds, selectedToolIds is now set to empty array instead of keeping old tools ## Issue Fixes #14157 - Switching models does not deselect previously selected tools ## Testing Manual testing recommended: 1. Select some tools with model A 2. Switch to model B (one without default tools) 3. Verify tools are deselected --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 14:13:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42234