fix(openai_mllm_python): migrate Realtime WebSocket client from beta to GA API#2167
Open
nitte93 wants to merge 1 commit into
Open
fix(openai_mllm_python): migrate Realtime WebSocket client from beta to GA API#2167nitte93 wants to merge 1 commit into
nitte93 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Title
Migrate openai_mllm_python from deprecated Realtime API beta to GA
Summary
Updates the openai_mllm_python extension to use OpenAI’s GA Realtime API. The beta interface (OpenAI-Beta: realtime=v1) was removed on 2026-05-12; this change keeps the existing extension API and config fields while aligning WebSocket protocol behavior with the beta-to-GA migration guide.
Connection: Stop sending the deprecated OpenAI-Beta: realtime=v1 header on OpenAI WebSocket connections.
Server events: Listen for GA event type strings (response.output_audio.delta, response.output_text.delta, response.output_audio_transcript.delta, and matching .done events). Internal enum/class names are unchanged.
Session updates: Serialize session.update to the GA shape (session.type: "realtime", nested audio.input / audio.output, output_modalities, max_output_tokens) via a small mapper so existing SessionUpdateParams fields (modalities, voice, turn_detection, input_audio_transcription, etc.) stay the same in code.
No WebRTC or client_secrets changes — this extension uses server-side WebSocket with an API key, which remains supported on GA.
Motivation
Without this migration, connections and event handling can fail against the current Realtime API after beta shutdown.