realtime: rename provider session ids#20361
Conversation
Rename the bidi and app-server realtime session_id fields to realtime_session_id so they no longer collide with Codex's new session terminology. Preserve legacy input aliases where needed and regenerate the app-server schema outputs. Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 565f9d0036
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub prompt: Option<Option<String>>, | ||
| #[ts(optional = nullable)] | ||
| pub session_id: Option<String>, | ||
| pub realtime_session_id: Option<String>, |
There was a problem hiding this comment.
Accept legacy sessionId on thread realtime start
Add a serde alias for the old sessionId key on ThreadRealtimeStartParams. With only realtimeSessionId mapped, legacy clients sending sessionId have that field ignored as unknown, leaving realtime_session_id as None; core then falls back to the thread id, so the caller’s explicit realtime session is lost. This contradicts the commit’s stated back-compat intent.
Useful? React with 👍 / 👎.
Summary
Codex is repurposing
sessionto mean a thread group, so the realtime provider session id should no longer usesession_id/sessionIdin Codex-facing protocol payloads. This PR renames that provider-specific field torealtime_session_id/realtimeSessionIdand intentionally breaks clients that still send the old field names.What Changed
ConversationStartParams,RealtimeConversationStartedEvent, andRealtimeEvent::SessionUpdated.realtimeSessionId.session_id/sessionId; clients must send the new names.session.idparsing andx-session-idheaders still use the upstream wire names.Testing
cargo test -p codex-protocolCODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-core realtime_conversationcargo test -p codex-app-server-protocolCODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-app-server realtime_conversationCODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-tui(local linker bus error while linking the test binary)