mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[PR #15120] [CLOSED] fix: use hash for remote server tools #10521
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15120
Author: @signorettif
Created: 6/18/2025
Status: ❌ Closed
Base:
dev← Head:fs-remote-tools-hash📝 Commits (4)
8aa2ad5feat: use hash for remote server tools6d8ef10cleanup37c79b4handle in the frontend955f95cconsisten encoding📊 Changes
4 files changed (+122 additions, -81 deletions)
View changed files
➕
.node-version(+1 -0)📝
backend/open_webui/routers/tools.py(+29 -29)📝
backend/open_webui/utils/tools.py(+59 -45)📝
src/lib/components/chat/Chat.svelte(+33 -7)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This PR makes it so the "in-memory" ID associated to remote server tools does not rely on its positional index inside the list. We use a cheap hash that allows us to persist the reference across tool changes. This is essential to ensure that
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
This is a somewhat breaking change since the definition of "models" saves the currently determined ID of the server tools in its definition. Therefore, any existing model implementation will reference no longer valid tools. This is something I have considered but omitted, given the current definition is extremely error prone.
We have however maintained backwards compatibility by checking if the segment after
server:is a number and shorter than 8 digits. This makes sure old model configs are working. But de-facto we have no idea if the selected tools are the intended ones. A warning has been added to incentivise the users to update their model config.Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.