Skip to content

feat(realtime): support sideband call_id connections#1795

Open
felmonon wants to merge 1 commit intoopenai:masterfrom
felmonon:feat/realtime-call-id-support
Open

feat(realtime): support sideband call_id connections#1795
felmonon wants to merge 1 commit intoopenai:masterfrom
felmonon:feat/realtime-call-id-support

Conversation

@felmonon
Copy link
Copy Markdown

Summary

Add callID support to the stable and beta Realtime WebSocket helpers for the documented OpenAI sideband control flow.

This updates the shared Realtime URL builder and both ws and browser WebSocket helpers to accept exactly one of:

  • model to start a new Realtime session
  • callID to attach to an in-progress OpenAI Realtime call via ?call_id=

For safety, Azure helpers remain deployment-based and reject callID explicitly rather than implying unsupported behavior.

Closes #1747.

Changes

  • add a shared RealtimeConnectionConfig with a runtime guard for model xor callID
  • thread callID support through stable and beta Realtime helpers
  • document the sideband callID flow in realtime.md
  • add focused tests covering OpenAI and Azure URL construction and invalid config cases

Testing

  • ./node_modules/.bin/jest tests/realtime.test.ts
  • ./node_modules/.bin/eslint src/realtime/internal-base.ts src/realtime/ws.ts src/realtime/websocket.ts src/beta/realtime/internal-base.ts src/beta/realtime/ws.ts src/beta/realtime/websocket.ts tests/realtime.test.ts
  • yarn build

@felmonon felmonon requested a review from a team as a code owner March 25, 2026 20:50
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.

Add support for call_id to OpenAIRealtimeWS SDK

1 participant