Skip to content

Realtime agents: truncations not handled by the SDK when interrupt on VAD is set. #2009

@nbondoux

Description

@nbondoux

It is specified in the openai documentation that when the model is so that it uses the VAD to interrupt a response, the SDK will automatically truncate the response item. ().
However, this is currently not done; when there is a speech_start event, the SDK will cancel the response, emit an RealtimeModelAudioInterruptedEvent, reset the latest_item from known by the playback track; however, no truncate event is sent to the server. The realtime server thus never is never made aware of the interruption.
No truncated event is ever received, and the server is completely unaware some information was not given to the human.

Debug information

  • Agents SDK version: v0.4.2
  • Python version: 3.13

Expected behavior

The same process should be done than what is done in session.interrupt()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions