Closed
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
The following initialization works and results in a realtime audio conversation:
async with client.beta.realtime.connect(model="gpt-4o-realtime-preview-2024-12-17") as openai_stream:
But when I try to use gpt-4o-mini, like so:
async with client.beta.realtime.connect(model="gpt-4o-mini-realtime-preview") as openai_stream:
I get the following errors after speaking:
{ 'event_id': 'event_BVkCL9CtzRVz1CIrI1jNe',
'response': { 'conversation_id': 'conv_BVkC88oBioiBmAEr6RYBn',
'id': 'resp_BVkCLamsLeAeHny8E3f1L',
'max_output_tokens': 4096,
'metadata': None,
'modalities': ['text', 'audio'],
'object': 'realtime.response',
'output': [],
'output_audio_format': 'pcm16',
'status': 'failed',
'status_details': { 'error': { 'code': None,
'message': 'The server had an error while '
'processing your request. Sorry about '
'that! Please contact us through our '
'help center at help.openai.com if the '
'error persists. (include session ID in '
'your message: '
'sess_BVkC8iXlHg3H71vTbI9Te). We '
'recommend you retry your request.',
'type': 'server_error'},
'reason': None,
'type': 'failed'},
'temperature': 0.8,
'usage': { 'input_token_details': { 'audio_tokens': 0,
'cached_tokens': 0,
'cached_tokens_details': { 'audio_tokens': 0,
'text_tokens': 0},
'text_tokens': 0},
'input_tokens': 0,
'output_token_details': {'audio_tokens': 0, 'text_tokens': 0},
'output_tokens': 0,
'total_tokens': 0},
'voice': 'verse'},
'type': 'response.done'}
To Reproduce
async with client.beta.realtime.connect(model="gpt-4o-mini-realtime-preview") as openai_stream:
Code snippets
OS
macOS
Python version
3.13
Library version
1.78.0
Metadata
Metadata
Assignees
Labels
Something isn't workingSomething isn't working