WeatherTool: fetch open-meteo directly, skip LLM for fast tool replies
- Replace SearXNG search with direct open-meteo.com API call (no key needed) - WeatherTool now returns a ready-to-deliver reply string - agent.py: short-circuit router+LLM when fast tools return a result (tier=fast) - router.py: fast tool match no longer triggers light reply generation Weather latency: 105-190s → ~1s Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -92,7 +92,8 @@ class Router:
|
||||
if force_complex:
|
||||
return "complex", None
|
||||
|
||||
# Step 0a: force medium if any fast tool matches (live-data queries)
|
||||
# Step 0a: fast tool match — agent.py short-circuits before reaching router
|
||||
# This branch is only hit if force_complex=True with a fast-tool message (rare)
|
||||
if self._fast_tool_runner and self._fast_tool_runner.any_matches(message.strip()):
|
||||
names = self._fast_tool_runner.matching_names(message.strip())
|
||||
print(f"[router] fast_tool_match={names} → medium", flush=True)
|
||||
|
||||
Reference in New Issue
Block a user