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 16, 2024
1 parent 20383bf commit fd021c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,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 fd021c3

Please sign in to comment.