File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type * as models from '../models/index.js';
22import type { APITool , Tool , ToolExecutionResult } from './tool-types.js' ;
33
44import { extractToolCallsFromResponse , responseHasToolCalls } from './stream-transformers.js' ;
5+ import { isFunctionCallOutputItem } from './stream-type-guards.js' ;
56import { executeTool , findToolByName } from './tool-executor.js' ;
67import { hasExecuteFunction } from './tool-types.js' ;
78import { buildTurnContext } from './turn-context.js' ;
@@ -105,7 +106,7 @@ export async function executeToolLoop(
105106 // Find the raw tool call from the response output
106107 const rawToolCall = currentResponse . output . find (
107108 ( item ) : item is models . ResponsesOutputItemFunctionCall =>
108- 'type' in item && item . type === 'function_call' && item . callId === toolCall . id
109+ isFunctionCallOutputItem ( item ) && item . callId === toolCall . id ,
109110 ) ;
110111
111112 if ( ! rawToolCall ) {
You can’t perform that action at this time.
0 commit comments