Skip to content

Commit

Permalink
Agents: Avoid calling tools that haven't been explicitly enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aidando73 committed Dec 21, 2024
1 parent bae197c commit 8119363
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ async def _run(
tool_call = message.tool_calls[0]

name = tool_call.tool_name
if not isinstance(name, BuiltinTool):
if not isinstance(name, BuiltinTool) or name not in enabled_tools:
yield message
return

Expand Down

0 comments on commit 8119363

Please sign in to comment.