fix(openai): skip realtime truncate when no audio was played fixes : #6157#6158
Open
ByteMaster-1 wants to merge 2 commits into
Open
fix(openai): skip realtime truncate when no audio was played fixes : #6157#6158ByteMaster-1 wants to merge 2 commits into
ByteMaster-1 wants to merge 2 commits into
Conversation
0de3d9f to
9fa9693
Compare
Address review (longcw): when audio_end_ms == 0 the server may hold a generated-but-unheard audio item (case 2). Delete it so the remote chat ctx matches the local one, guarded on the item actually existing remotely so we don't surface a delete error for the never-committed case (case 1).
areebkhan-tech
approved these changes
Jun 23, 2026
longcw
approved these changes
Jun 24, 2026
longcw
left a comment
Contributor
There was a problem hiding this comment.
looks good to me, something nit:
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.
Fixes #6157
Skip the realtime
conversation.item.truncatewhen the generation isinterrupted before any audio frame has played (
audio_end_ms == 0), whichthe Realtime API rejects with
unsupported_content_type("Only model output audio messages can be truncated").