Bug Description
We are frequently encountering session failures while using the OpenAI Realtime model (gpt-realtime) in our voice agent pipeline. The error occurs during active realtime sessions and is logged as a realtime_model_error with an underlying server_error returned by the OpenAI Realtime API.
Error Log (Sample)
Session error occurred:
type='realtime_model_error'
label='livekit.plugins.openai.realtime.realtime_model.RealtimeModel'
error=APIError('OpenAI Realtime API response failed with error type: server_error')
recoverable=True
We are using the following way with different types of tools in agents.py
turn_detection = build_turn_detection(vad_type="semantic_vad", eagerness="high")
logger.info(f"Using VAD type: {turn_detection.type} for OpenAI Realtime model")
model = openai.realtime.RealtimeModel(
model=llm_config.model_name,
modalities=["text"], # Force text output only for hybrid mode
input_audio_transcription=input_audio_transcription,
turn_detection=turn_detection,
)
Expected Behavior
It should work properly
Reproduction Steps
Using OpenAI Realtime Model should raise this error
Operating System
ubuntu 22.04
Models Used
Deepgram, OpenAI, ElevenLab
Package Versions
Session/Room/Call IDs
No response
Proposed Solution
Additional Context
No response
Screenshots and Recordings
No response
Bug Description
We are frequently encountering session failures while using the OpenAI Realtime model (
gpt-realtime) in our voice agent pipeline. The error occurs during active realtime sessions and is logged as arealtime_model_errorwith an underlyingserver_errorreturned by the OpenAI Realtime API.Error Log (Sample)
We are using the following way with different types of tools in
agents.pyExpected Behavior
It should work properly
Reproduction Steps
Operating System
ubuntu 22.04
Models Used
Deepgram, OpenAI, ElevenLab
Package Versions
Session/Room/Call IDs
No response
Proposed Solution
Additional Context
No response
Screenshots and Recordings
No response