Skip to content

Commit c7ce1a4

Browse files
committed
Allow any tool from handleSteps!
1 parent c929e2b commit c7ce1a4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

backend/src/run-programmatic-step.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,13 @@ export async function runProgrammaticStep(
194194
includeToolCall?: boolean
195195
}
196196

197-
if (!template.toolNames.includes(toolCall.toolName)) {
198-
throw new Error(
199-
`Tool ${toolCall.toolName} is not available for agent ${template.id}. Available tools: ${template.toolNames.join(', ')}`,
200-
)
201-
}
197+
// Note: We don't check if the tool is available for the agent template anymore.
198+
// You can run any tool from handleSteps now!
199+
// if (!template.toolNames.includes(toolCall.toolName)) {
200+
// throw new Error(
201+
// `Tool ${toolCall.toolName} is not available for agent ${template.id}. Available tools: ${template.toolNames.join(', ')}`,
202+
// )
203+
// }
202204

203205
const excludeToolFromMessageHistory = toolCall?.includeToolCall === false
204206
// Add assistant message with the tool call before executing it

0 commit comments

Comments
 (0)