Skip to content

fix xAI realtime update chat ctx#5320

Open
longcw wants to merge 1 commit intomainfrom
longc/fix-xai-realtime
Open

fix xAI realtime update chat ctx#5320
longcw wants to merge 1 commit intomainfrom
longc/fix-xai-realtime

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented Apr 3, 2026

this pr fixed issues

  • conversation.item.added event always has the previous_item_id as None, causing the latest item being inserted at the top
  • conversation.item.deleted event has item_id empty, causing "failed to delete item" error, in this fix we assume it's the first item in to queue
  • input audio transcript was duplicated in the rt_session's chat item's content

@chenghao-mou chenghao-mou requested a review from a team April 3, 2026 05:35
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

self._session_connected_at: float = 0.0

# keep the order of item deletion futures
self._item_delete_future = OrderedDict[str, asyncio.Future]()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we don't this override for Python 3.7+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants