Member Junction
    Preparing search index...

    Class RealtimeToolBatchBarrier

    Coordinates batched tool-call completions for realtime sessions that require a single turn-continuation trigger (e.g. OpenAI Live response.create) per batch of parallel tool calls, rather than firing per tool result.

    Requirements (§4.2 / §4.3 of plans/realtime/gpt-live-1.md):

    • Multiple parallel tool calls arrive in a single turn.
    • Each tool output must be appended (e.g. response.item.create).
    • Exactly ONE response.create must be sent when the outstanding set drains.
    • A safety timeout ensures a lost or unreturned tool call does not wedge the session indefinitely.
    • Unknown or duplicate results for already closed calls never re-fire response.create.
    Index

    Constructors

    Accessors

    Methods

    • Returns true when THIS result drains the batch and the caller should send response.create. If the call was not in the outstanding set (unknown or duplicate), returns false.

      Parameters

      • callId: string

        The tool call identifier.

      Returns boolean

    • Records an outstanding tool call ID that must be answered.

      Parameters

      • callId: string

        The tool call identifier.

      • OptionalonTimeoutFlush: () => void

        Optional callback to invoke if the batch times out waiting for remaining results.

      Returns void