MCPcopy Index your code
hub / github.com/simstudioai/sim / checkForForcedToolUsage

Function checkForForcedToolUsage

apps/sim/providers/openai/core.ts:292–308  ·  view source on GitHub ↗
(
      toolCallsInResponse: ResponsesToolCall[],
      toolChoice: ToolChoice | undefined
    )

Source from the content-addressed store, hash-verified

290 let currentTrackingToolChoice = trackingToolChoice
291
292 const checkForForcedToolUsage = (
293 toolCallsInResponse: ResponsesToolCall[],
294 toolChoice: ToolChoice | undefined
295 ) => {
296 if (typeof toolChoice === 'object' && toolCallsInResponse.length > 0) {
297 const result = trackForcedToolUsage(
298 toolCallsInResponse,
299 toolChoice,
300 logger,
301 config.providerId,
302 forcedTools,
303 usedForcedTools
304 )
305 hasUsedForcedTool = result.hasUsedForcedTool
306 usedForcedTools = result.usedForcedTools
307 }
308 }
309
310 const currentInput: ResponsesInputItem[] = [...initialInput]
311 let currentResponse = await postResponses(

Callers 1

Calls 1

trackForcedToolUsageFunction · 0.90

Tested by

no test coverage detected