Update more realtime spec #397
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Summary
Syncs
async-openai
realtime types with the latest OpenAI Realtime API (June 2025).Adds richer request/response configs, new client & server events, extra enums for models / voices / modalities, plus tracing & noise-reduction support.
✨ What’s new
Client events
ResponseConfig
,OutputAudioBufferClearEvent
,ConversationItemRetrieveEvent
.ResponseCancelEvent
gainsresponse_id
.ResponseCreateEvent
now usesResponseConfig
instead ofSessionResource
.Server events
output_audio_buffer.cleared
,conversation.item.input_audio_transcription.delta
,conversation.item.retrieved
.InputAudioBufferCommitedEvent
→InputAudioBufferCommittedEvent
.Response resource
finish_reason
,created_at
.TokenLimit
,FunctionCall
.Session resource
RealtimeModel
,Modality
,NoiseReductionType
.speed
,input_audio_noise_reduction
,tracing
.model
is nowRealtimeModel
;modalities
isVec<Modality>
.Turn detection
semantic_vad
mode withcreate_response
andinterrupt_response
flags.Audio
g711_ulaw
,g711_alaw
).InputAudioNoiseReduction
.Tooling
ToolChoice
&ToolDefinition
intoResponseConfig
.ResponseCreateEvent
:response
now expectsResponseConfig
, notSessionResource
.g711-ulaw
/g711-alaw
→g711_ulaw
/g711_alaw
.InputAudioBufferCommitedEvent
→InputAudioBufferCommittedEvent
.SessionResource.model
is nowRealtimeModel
(no longer a free-formString
).