From ab6976b5bf6b1f18149a4f6c8ec4e2d90adec643 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:25:31 -0400 Subject: [PATCH] fix: when two tools have a function with the same name, the model can call both (#32670) --- backend/open_webui/utils/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 18eb0781f3..a8e507d383 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -451,6 +451,7 @@ async def get_tools(request: Request, tool_ids: list[str], user: UserModel, extr # Prepend tool ID to function name function_name = f'{tool_id}_{function_name}' + tool_dict['spec'] = {**tool_dict['spec'], 'name': function_name} tools_dict[function_name] = tool_dict else: if tool_id.startswith('server:'): @@ -551,6 +552,7 @@ async def get_tools(request: Request, tool_ids: list[str], user: UserModel, extr # Prepend server ID to function name function_name = f'{server_id}_{function_name}' + tool_dict['spec'] = {**tool_dict['spec'], 'name': function_name} tools_dict[function_name] = tool_dict else: