diff --git a/lib/client.js b/lib/client.js index be37288..44f288c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -355,8 +355,9 @@ export class RealtimeClient extends RealtimeEventHandler { if (item.status === 'completed') { this.dispatch('conversation.item.completed', { item }); } - if (item.formatted.tool) { - callTool(item.formatted.tool); + const tool = item.formatted.tool; + if (tool && this.tools[tool.name]?.handler) { + callTool(tool); } });