From f1a1e64d2e9ad953b2bc2a9543e9a308b7c669c8 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 15 Feb 2026 17:20:49 -0600 Subject: [PATCH] refac: explicit toggle builtin tools --- backend/open_webui/utils/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index cb43cf4ef4..70b8bd3e1d 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -471,6 +471,7 @@ def get_builtin_tools( is_builtin_tool_enabled("web_search") and getattr(request.app.state.config, "ENABLE_WEB_SEARCH", False) and get_model_capability("web_search") + and features.get("web_search") ): builtin_functions.extend([search_web, fetch_url]) @@ -479,12 +480,14 @@ def get_builtin_tools( is_builtin_tool_enabled("image_generation") and getattr(request.app.state.config, "ENABLE_IMAGE_GENERATION", False) and get_model_capability("image_generation") + and features.get("image_generation") ): builtin_functions.append(generate_image) if ( is_builtin_tool_enabled("image_generation") and getattr(request.app.state.config, "ENABLE_IMAGE_EDIT", False) and get_model_capability("image_generation") + and features.get("image_generation") ): builtin_functions.append(edit_image) @@ -493,6 +496,7 @@ def get_builtin_tools( is_builtin_tool_enabled("code_interpreter") and getattr(request.app.state.config, "ENABLE_CODE_INTERPRETER", True) and get_model_capability("code_interpreter") + and features.get("code_interpreter") ): builtin_functions.append(execute_code)