connectOpenAi fails with server_error code 42 while OpenAI Realtime direct test succeeds
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, next.js, node.js
- Domain
- audio-video-rtc, backend-api-design
Research direction
Start at the connectOpenAi call in the Next.js app and review the listed @stream-io/node-sdk and @stream-io/openai-realtime-api versions alongside the Vercel deployment. Reproduce the successful client_secrets request and the failing agent connection, then determine whether the setup is supported and which Stream settings, permissions, or entitlements are required.
Written by the indexing model from the issue text.
Description
Hi Stream team,
I’m using Stream Video with OpenAI Realtime in a Next.js app deployed on Vercel.
Packages:
- @stream-io/[email protected]
- @stream-io/[email protected]
- Next.js 15.3.8
- Deployed on Vercel
OpenAI Realtime direct test succeeds:
POST https://api.openai.com/v1/realtime/client_secrets
model: gpt-4o-realtime-preview
status: 200 OK
But Stream connectOpenAi fails:
const realtimeClient = await streamVideo.video.connectOpenAi({
call,
openAiApiKey: process.env.OPENAI_API_KEY,
agentUserId: "lucy",
model: "gpt-4o-realtime-preview",
});
Error:
{
type: "error",
error: {
type: "server_error",
code: "42",
message: "Error: code ",
param: null,
event_id: ""
}
}
Additional context:
- The Stream call is created successfully.
- The user joins successfully.
- The agent user "lucy" appears to join and then leaves.
- Webhooks show call.session_participant_joined and call.session_participant_left for lucy.
- OpenAI Realtime client_secret endpoint returns 200 OK, so the OpenAI key and Realtime access appear valid.
Can you confirm whether connectOpenAi currently supports this setup, and whether any Stream app settings, permissions, or entitlements are required for OpenAI Realtime agents?
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GetStream/openai-tutorial-node
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
All issues in GetStream/openai-tutorial-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Possibly taken @goranai claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
NL-BioImaging/OMERO.biomero#92 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
nicobailon/pi-web-access#710 ·
Maintainers usually reply within 1 day