Theia API Documentation v1.77.0
    Preparing search index...

    Executes the tool calls of a single language model response/turn.

    Concurrency contract: tool calls emitted within a single model response/turn are executed concurrently. All matched handlers are started before any of them is awaited. A tool handler must therefore not assume that it runs in isolation or in array order, and must be safe to overlap with sibling calls from the same turn. Models serialize dependent calls across turns (by withholding a dependent call until it has seen the prior result), so "issued together in one turn" is the model's signal that the calls are independent.

    Error handling is uniform across all language model providers:

    • If no ToolRequest matches a call's name, its result is a createToolCallError with kind 'tool-not-available' and notFound is true.
    • If a handler throws/rejects, the rejection is caught, logged, and converted to a createToolCallError; the original error is exposed on error.
    • The overall tool execution promise never rejects but returns a result that may include errors from failed tool calls

    Implements

    Index
    logger: ILogger