Skip to content

Parallel Tool Execution #4254

@rafaelrddc

Description

@rafaelrddc

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

The DefaultToolCallingManager should process tool calls in parallel rather than sequentially when multiple independent tool calls are present in an AssistantMessage. This would significantly improve performance for scenarios requiring multiple concurrent AI tool interactions.

Current Behavior

The DefaultToolCallingManager processes tool calls sequentially using a simple for-loop:

for (AssistantMessage.ToolCall toolCall : assistantMessage.getToolCalls()) {
    // Sequential processing
}

This creates performance bottlenecks when dealing with multiple independent tool calls that could be executed concurrently.

Context

Proposed Solution

  • Add parallel execution capability to DefaultToolCallingManager
  • Ensure proper error handling and response ordering

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions