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)