Skip to content

fix: emit RealtimeHistoryUpdated on transcript_delta#3570

Open
jordanchendev wants to merge 1 commit into
openai:mainfrom
jordanchendev:fix/2940-history-updated-transcript-delta
Open

fix: emit RealtimeHistoryUpdated on transcript_delta#3570
jordanchendev wants to merge 1 commit into
openai:mainfrom
jordanchendev:fix/2940-history-updated-transcript-delta

Conversation

@jordanchendev
Copy link
Copy Markdown

Summary

RealtimeSession updated _history with the accumulated transcript on each transcript_delta event but never emitted RealtimeHistoryUpdated. Every other branch that mutates history (item_updated, item_deleted, transcription_completed) does emit the event, so UI subscribers following the documented history_added / history_updated pattern saw no live transcript changes during streaming.

This fix emits RealtimeHistoryUpdated immediately after the history update in the transcript_delta branch, consistent with all other history-mutating paths.

Test plan

  • Added regression test test_transcript_delta_emits_history_updated that verifies both a RealtimeRawModelEvent and a RealtimeHistoryUpdated are emitted for each transcript_delta event.
  • Updated test_ignored_events_only_generate_raw_events to reflect the corrected behavior (4 events instead of 3: transcript_delta now produces a raw event + a history update).
  • uv run pytest tests/realtime/ -q → 256 passed
  • make format && make lint → all checks passed

Issue number

Closes #2940

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

RealtimeSession updated _history with the accumulated transcript on
each transcript_delta event but never emitted RealtimeHistoryUpdated.
Every other branch that mutates history (item_updated, item_deleted,
transcription_completed) does emit the event, so UI subscribers
following the documented history_added / history_updated pattern
saw no live transcript changes.

Emit RealtimeHistoryUpdated immediately after the history update in
the transcript_delta branch, consistent with all other
history-mutating paths.

Fixes openai#2940
@seratch seratch added duplicate This issue or pull request already exists feature:realtime labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists feature:realtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RealtimeSession does not emit history_updated for transcript_delta

2 participants