refactor: move tool availability checks into registration

This commit is contained in:
0xallam
2026-03-19 23:38:23 -07:00
committed by Ahmed Allam
parent 31d8a09c95
commit 8765b1895c
5 changed files with 161 additions and 53 deletions

View File

@@ -31,7 +31,7 @@ Structure your response to be comprehensive yet concise, emphasizing the most cr
security implications and details."""
@register_tool(sandbox_execution=False)
@register_tool(sandbox_execution=False, requires_web_search_mode=True)
def web_search(query: str) -> dict[str, Any]:
try:
api_key = os.getenv("PERPLEXITY_API_KEY")