mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 23:55:15 -05:00
[PR #19118] [CLOSED] fix: __user__['valves'] should reflect current tool's UserValves when using multiple tools #11893
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/19118
Author: @Podden
Created: 11/11/2025
Status: ❌ Closed
Base:
dev← Head:fix-uservalves-multiple-tools📝 Commits (1)
23b639afix: user['valves'] should reflect current tool's UserValves when using multiple tools📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
backend/open_webui/utils/tools.py(+6 -6)📄 Description
I noticed UserValves we're incorrect when custom pipe and multiple tools are used in a request:
All Tool are getting the same
__user__["valves"], namely the valves from the last tool in the list, resulting in errors when calling methods who need uservalves.I've pinpoint the root of the problem in
tool.py, whereextra_paramsis used in conjunction withfunctool.partial, which copies the dict but only references the content. When extra_params["user"]["valves"] gets overwritten by the next tool, it changes it for all tools, resulting in wrong uservalves per tool. Setting extra_params per method instead of per tool solved this problem.Problem Example:
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.