This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-29 04:43:40 -05:00
1 parent e5b5e5917b
commit 953432b5fe
3 files changed
+4 -3

No files matched your search

+1 -1
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 # code_interpreter is excluded: it requires the frontend event emitter
# and does not work in headless backend execution. # and does not work in headless backend execution.
feature_checks = { 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'), 'image_generation': await Config.get('image_generation.enable'),
} }
+2 -2
View File
@@ -476,7 +476,7 @@ async def get_builtin_tools(
# Helper to check user-level feature permission (admins always pass) # Helper to check user-level feature permission (admins always pass)
user = extra_params.get('__user__', {}) user = extra_params.get('__user__', {})
config = await Config.get_many( config = await Config.get_many(
'rag.web.search.enable', 'web.search.enable',
'image_generation.enable', 'image_generation.enable',
'images.edit.enable', 'images.edit.enable',
'code_interpreter.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 # Add web search tools if builtin category enabled AND enabled globally AND model has web_search capability
if ( if (
is_builtin_tool_enabled('web_search') 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 get_model_capability('web_search')
and features.get('web_search') and features.get('web_search')
and await has_user_permission('web_search') and await has_user_permission('web_search')
+1
View File
@@ -58,6 +58,7 @@ type RAGConfigForm = {
chunk?: ChunkConfigForm; chunk?: ChunkConfigForm;
content_extraction?: ContentExtractConfigForm; content_extraction?: ContentExtractConfigForm;
web_loader_ssl_verification?: boolean; web_loader_ssl_verification?: boolean;
web?: Record<string, unknown>;
youtube?: YoutubeConfigForm; youtube?: YoutubeConfigForm;
}; };