Add singleToolPerStep
option to prevent multiple tool calls within one step
#3854
Labels
singleToolPerStep
option to prevent multiple tool calls within one step
#3854
Feature Description
I propose adding a new configuration option
singleToolPerStep
that would restrict the AI to generating only one tool call per step. Currently, the AI SDK allows multiple tool calls to be generated within a single step, which can lead to race conditions and complex execution flows.This would be implemented at the SDK level rather than requiring developers to implement their own synchronization logic. When enabled, the SDK would:
Use Cases
Use Cases
Terminal/Command Execution: When executing terminal commands, it's crucial to process them sequentially and analyze each output before proceeding with the next command.
Database Operations: When performing database queries or updates, executing one operation at a time ensures proper transaction handling and prevents race conditions.
API Calls: When making external API calls, processing one request at a time allows for proper error handling and response analysis before proceeding.
File System Operations: When working with files, sequential operations ensure proper file handling and prevent concurrent access issues.
Additional context
No response
The text was updated successfully, but these errors were encountered: