fix(chat): honor explicit web search denial

This commit is contained in:
Odysseus Review Oracle
2026-07-04 23:33:43 +00:00
parent d8d98caa78
commit 264da65186
2 changed files with 22 additions and 11 deletions
-2
View File
@@ -781,11 +781,9 @@ def setup_chat_routes(
# by default without having to send allow_bash in every request.
if allow_bash is not None and str(allow_bash).lower() != "true":
disabled_tools.add("bash")
_explicit_web_intent = bool(_tool_intent and _tool_intent.category == "web")
if (
allow_web_search is not None
and str(allow_web_search).lower() != "true"
and not _explicit_web_intent
):
disabled_tools.add("web_search")
disabled_tools.add("web_fetch")