This commit is contained in:
Timothy Jaeryang Baek
2026-06-29 04:43:40 -05:00
parent e5b5e5917b
commit 953432b5fe
3 changed files with 4 additions and 3 deletions

View File

@@ -273,7 +273,7 @@ async def _resolve_model_features(app, model_id: str) -> dict:
# code_interpreter is excluded: it requires the frontend event emitter
# and does not work in headless backend execution.
feature_checks = {
'web_search': await Config.get('rag.web.search.enable'),
'web_search': await Config.get('web.search.enable'),
'image_generation': await Config.get('image_generation.enable'),
}

View File

@@ -476,7 +476,7 @@ async def get_builtin_tools(
# Helper to check user-level feature permission (admins always pass)
user = extra_params.get('__user__', {})
config = await Config.get_many(
'rag.web.search.enable',
'web.search.enable',
'image_generation.enable',
'images.edit.enable',
'code_interpreter.enable',
@@ -569,7 +569,7 @@ async def get_builtin_tools(
# Add web search tools if builtin category enabled AND enabled globally AND model has web_search capability
if (
is_builtin_tool_enabled('web_search')
and config.get('rag.web.search.enable')
and config.get('web.search.enable')
and get_model_capability('web_search')
and features.get('web_search')
and await has_user_permission('web_search')

View File

@@ -58,6 +58,7 @@ type RAGConfigForm = {
chunk?: ChunkConfigForm;
content_extraction?: ContentExtractConfigForm;
web_loader_ssl_verification?: boolean;
web?: Record<string, unknown>;
youtube?: YoutubeConfigForm;
};