-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Within a realtime session, created with the turn_detection.interrupt_response
set, the guardrail triggering fails and emit the following error event:
RealtimeErrorEvent(error=RealtimeError(message='Conversation already has an active response in progress: .... Wait until the response is finished before creating a new one.', type='invalid_request_error', code='conversation_already_has_active_response', event_id=None, param=None), event_id='event...', type='error')
My guess is that no response.cancel server event is sent during the interruption triggered by the guardrail, while it should always be.
In OpenAIRealtimeWebSocketModel._send_interrupt
, response.cancel is triggered if turn_detection.interrupt_response
is not set, and the guardrail process flow doesn't trigger a response.cancel event on its side.
Debug information
- Agents SDK version: 0.3.2
- Python version: Python 3.13
Repro steps
create an agent without setting a PlaybackTracker, and with turn_detection.interrupt_response set. Trigger a any guardrail.
Expected behavior
Guardrail interrupts and successfully send user input to the model with the tripped guardrail data.