fix(agent): honor explicit web search requests

Promote explicit web-search phrasing to tool use and keep web_search/web_fetch available for that turn even when the stale web toggle is false.
This commit is contained in:
Dividesbyzer0
2026-06-15 02:02:10 -04:00
committed by GitHub
parent a7766d0b7f
commit a07fe35936
7 changed files with 51 additions and 4 deletions
+7
View File
@@ -49,6 +49,13 @@ def test_research_action_promotes_to_agent():
assert message_needs_tools("can you look into GPU hosting options")
def test_explicit_web_search_promotes_to_agent():
assert message_needs_tools("use web search and find a recipe for chocolate chip cookies")
assert message_needs_tools("do a web search for the best chocolate chip cookies")
assert message_needs_tools("search the web for current RTX 3090 prices")
assert classify_tool_intent("use web search and find a recipe").category == "web"
def test_explanatory_calendar_questions_stay_plain_chat():
assert not message_needs_tools("How do I add an entry to my calendar?")
assert not message_needs_tools("What about the built-in Odysseus calendar, is that linked to email?")