Skip to content

realtime: rename provider session ids#20361

Merged
aibrahim-oai merged 2 commits into
mainfrom
dev/realtime-session-id-rename
Apr 30, 2026
Merged

realtime: rename provider session ids#20361
aibrahim-oai merged 2 commits into
mainfrom
dev/realtime-session-id-rename

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Codex is repurposing session to mean a thread group, so the realtime provider session id should no longer use session_id / sessionId in Codex-facing protocol payloads. This PR renames that provider-specific field to realtime_session_id / realtimeSessionId and intentionally breaks clients that still send the old field names.

What Changed

  • Renamed realtime provider session fields in ConversationStartParams, RealtimeConversationStartedEvent, and RealtimeEvent::SessionUpdated.
  • Renamed app-server v2 realtime request and notification fields to realtimeSessionId.
  • Removed legacy serde aliases for session_id / sessionId; clients must send the new names.
  • Propagated the rename through core realtime startup, app-server adapters, codex-api websocket handling, and TUI realtime state.
  • Regenerated app-server protocol schema/TypeScript outputs and updated app-server README examples.
  • Kept upstream Realtime API concepts unchanged: provider session.id parsing and x-session-id headers still use the upstream wire names.

Testing

  • CI is running on the latest pushed commit.
  • Earlier local verification on this PR:
    • cargo test -p codex-protocol
    • CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-core realtime_conversation
    • cargo test -p codex-app-server-protocol
    • CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-app-server realtime_conversation
    • attempted CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-tui (local linker bus error while linking the test binary)

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>
@aibrahim-oai aibrahim-oai marked this pull request as ready for review April 30, 2026 09:03
@aibrahim-oai aibrahim-oai requested a review from a team as a code owner April 30, 2026 09:03
@aibrahim-oai aibrahim-oai changed the title realtime: rename provider session ids in bidi surfaces realtime: rename provider session ids Apr 30, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 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>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@jif-oai jif-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ty

@aibrahim-oai aibrahim-oai merged commit 8a97f3c into main Apr 30, 2026
25 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/realtime-session-id-rename branch April 30, 2026 10:39
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants