Skip to content

fix: #2940 emit RealtimeHistoryUpdated on transcript_delta#3086

Open
Quratulain-bilal wants to merge 3 commits intoopenai:mainfrom
Quratulain-bilal:fix/realtime-transcript-delta-history-updated
Open

fix: #2940 emit RealtimeHistoryUpdated on transcript_delta#3086
Quratulain-bilal wants to merge 3 commits intoopenai:mainfrom
Quratulain-bilal:fix/realtime-transcript-delta-history-updated

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

Summary

  • Fixes RealtimeSession does not emit history_updated for transcript_delta #2940. RealtimeSession previously updated self._history on
    transcript_delta events but only forwarded the raw model event, so
    subscribers following the documented history_added / history_updated
    pattern missed live transcript updates.
  • Emit RealtimeHistoryUpdated after the history mutation, mirroring the
    input_audio_transcription_completed branch.
  • Updated the existing test that asserted transcript_delta was an ignored
    event, and added a new test asserting the event now emits
    RealtimeHistoryUpdated.

Test plan

  • uv run pytest tests/realtime/test_session.py — 66 passed

When RealtimeSession received a RealtimeModelTranscriptDeltaEvent, it
accumulated transcript text into self._history but only forwarded the
raw model event. Subscribers that follow the documented history_added /
history_updated pattern never observed the live transcript update.

Emit RealtimeHistoryUpdated after the history mutation, matching the
input_audio_transcription_completed branch, and update the session test
that asserted transcript_delta was an ignored event.
@github-actions github-actions Bot added bug Something isn't working feature:realtime labels May 2, 2026
@seratch seratch marked this pull request as draft May 4, 2026 00:43
@seratch seratch marked this pull request as ready for review May 4, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:realtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RealtimeSession does not emit history_updated for transcript_delta

1 participant