[PR #21368] [CLOSED] fix: Pass configured tools to models in multi-model comparison mode #41679

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21368
Author: @YannickPezeu
Created: 2/13/2026
Status: Closed

Base: mainHead: multi_model_tools


📝 Commits (2)

  • 7330af9 feat: add admin setting for citation content format (plain text or markdown)
  • a1ce0ea Fix tools not passed to models in multi-model comparison mode

📊 Changes

6 files changed (+42 additions, -2 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 backend/open_webui/main.py (+3 -0)
📝 backend/open_webui/routers/auths.py (+4 -0)
📝 src/lib/components/admin/Settings/General.svelte (+13 -0)
📝 src/lib/components/chat/Chat.svelte (+7 -1)
📝 src/lib/components/chat/Messages/Citations/CitationModal.svelte (+9 -1)

📄 Description

Summary

  • Fixes a bug where tools configured on custom models were not loaded when using side-by-side multi-model comparison
  • Each model now correctly receives its configured tools merged with any user-selected tools

Root cause

In Chat.svelte, setDefaults() returns early when multiple models are selected, skipping tool loading. The sendMessageSocket() function used the global selectedToolIds which was empty in multi-model mode.

Fix

In sendMessageSocket(), merge model-configured tools (model.info.meta.toolIds) with user-selected tools before sending to the backend, ensuring each model gets its own correct set of tools.

Test plan

  • Create two custom models, each with different tools assigned
  • Open a multi-model comparison chat with both models side by side
  • Send a message that triggers tool use — verify each model uses its own tools
  • Verify single-model mode still works as before

🤖 Generated with Claude Code


🔄 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/21368 **Author:** [@YannickPezeu](https://github.com/YannickPezeu) **Created:** 2/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `multi_model_tools` --- ### 📝 Commits (2) - [`7330af9`](https://github.com/open-webui/open-webui/commit/7330af9f48f2204a76cf37a27acc4ff9e05e6ecf) feat: add admin setting for citation content format (plain text or markdown) - [`a1ce0ea`](https://github.com/open-webui/open-webui/commit/a1ce0ead0324a89f8719dda4a3607c2581502496) Fix tools not passed to models in multi-model comparison mode ### 📊 Changes **6 files changed** (+42 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/open_webui/main.py` (+3 -0) 📝 `backend/open_webui/routers/auths.py` (+4 -0) 📝 `src/lib/components/admin/Settings/General.svelte` (+13 -0) 📝 `src/lib/components/chat/Chat.svelte` (+7 -1) 📝 `src/lib/components/chat/Messages/Citations/CitationModal.svelte` (+9 -1) </details> ### 📄 Description ## Summary - Fixes a bug where tools configured on custom models were **not loaded** when using side-by-side multi-model comparison - Each model now correctly receives its configured tools merged with any user-selected tools ## Root cause In `Chat.svelte`, `setDefaults()` returns early when multiple models are selected, skipping tool loading. The `sendMessageSocket()` function used the global `selectedToolIds` which was empty in multi-model mode. ## Fix In `sendMessageSocket()`, merge model-configured tools (`model.info.meta.toolIds`) with user-selected tools before sending to the backend, ensuring each model gets its own correct set of tools. ## Test plan - [ ] Create two custom models, each with different tools assigned - [ ] Open a multi-model comparison chat with both models side by side - [ ] Send a message that triggers tool use — verify each model uses its own tools - [ ] Verify single-model mode still works as before 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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 13:51:37 -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#41679