Skip to content

connectOpenAi fails with server_error code 42 — backend still on shut-down OpenAI Realtime Beta API? #317

Description

@Abdulatif90

Describe the bug

streamVideo.video.connectOpenAi() always fails with server_error code 42.
The agent never joins the call.

Endpoint: wss://video.stream-io-api.com/video/connect_agent
Response:

{"type":"server_error","code":"42","message":"Error:  code "}

Environment

  • @stream-io/node-sdk: 0.4.24
  • @stream-io/openai-realtime-api: 0.4.0 (latest)
  • Model: gpt-realtime
  • Call type: default
  • App API key: zvgv9fafmjg3

What we already ruled out

  1. OpenAI key is valid and funded (Tier 1): a direct WebSocket to
    wss://api.openai.com/v1/realtime?model=gpt-realtime with the same key
    returns session.created successfully.
  2. Not an app-config issue: reproduced identically on a brand-new Stream
    app created 2026-07-05 with default settings.
  3. Client already upgraded: with openai-realtime-api 0.1.4 → 0.4.0 the
    error is unchanged. The v0.4.0 client's own error message says the
    /video/connect_agent backend must be updated to the GA Realtime API and
    to contact support if the error persists after upgrading — it persists.

Repro

const call = client.video.call("default", callId);
await call.getOrCreate({ data: { created_by_id: "user-1" } });
await client.video.connectOpenAi({
  call,
  openAiApiKey: process.env.OPENAI_API_KEY!,
  agentUserId: "agent-1",
  model: "gpt-realtime",
}); // → server_error code 42

Expected

The agent connects to the call via the GA OpenAI Realtime API.

Is GA support rolled out per-app/region? Is there a flag we need enabled?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions