Skip to content

[Bug]: OpenAI OAuth Realtime Talk sessions fail /v1/realtime/calls with HTTP 500 #90456

Closed

Description

@sergiopesch

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw 2026.6.1, OpenAI OAuth-backed Realtime Talk reports configured and returns Realtime session metadata, but every media handshake to https://api.openai.com/v1/realtime/calls returns HTTP 500 when no OpenAI API key is configured.

Steps to reproduce

  1. Run installed OpenClaw 2026.6.1 Gateway on loopback. In this repro the Gateway was already running at ws://127.0.0.1:18789 through the managed systemd user service.

  2. Confirm OpenAI Realtime Talk has no direct API key configured but reports configured through OAuth:

    OPENCLAW_GATEWAY_URL=ws://127.0.0.1:18789 node scripts/audit-linux-talk-realtime-handshake.mjs --session main --json
  3. Optionally run the relay repro against the same installed Gateway:

    node scripts/audit-linux-talk-realtime-relay.mjs --url ws://127.0.0.1:18789 --session main --json

Expected behavior

Either OpenAI OAuth-backed Realtime Talk should complete the media handshake, or OpenClaw should not report OAuth/no-key OpenAI Realtime as configured/media-ready without a passing live /v1/realtime/calls audit.

Actual behavior

The Gateway reports OpenAI Realtime as configured and talk.client.create returns Realtime session metadata, but every tested SDP offer to https://api.openai.com/v1/realtime/calls returns HTTP 500 Internal Server Error.

The Gateway relay path also fails before ready. On installed 2026.6.1 that relay failure is surfaced to the audit as a close before ready with reason completed; the WebRTC audit below shows the underlying media handshake failure is HTTP 500.

OpenClaw version

OpenClaw 2026.6.1 (2e08f0f)

Operating system

Ubuntu 24.04.4 LTS

Install method

npm/global install with managed systemd user Gateway service.

Gateway status excerpt:

CLI: OpenClaw 2026.6.1 (2e08f0f)
Gateway service: systemd user, running
Gateway target: ws://127.0.0.1:18789
Node: v24.16.0

Model

gpt-realtime-2 and gpt-realtime

Provider / routing chain

OpenClaw Gateway Talk -> OpenAI Realtime provider -> OAuth-backed Realtime client secret/session metadata -> https://api.openai.com/v1/realtime/calls

Additional provider/model setup details

No direct OpenAI API key was configured for the tested Gateway Realtime path.

Observed audit fields:

{
  "provider": "openai",
  "mode": "realtime",
  "transport": "webrtc",
  "brain": "agent-consult",
  "model": "gpt-realtime-2",
  "voice": "cedar",
  "hasConfiguredApiKey": false,
  "hasOpenAIApiKeyEnv": false
}

talk.catalog reported the provider as configured and browser-session capable:

{
  "activeProvider": "openai",
  "provider": "openai",
  "configured": true,
  "modes": ["realtime"],
  "transports": ["webrtc", "gateway-relay"],
  "brains": ["agent-consult"],
  "supportsBrowserSession": true,
  "supportsToolCalls": true
}

Logs, screenshots, and evidence

Primary WebRTC audit result on installed OpenClaw 2026.6.1:

{
  "runtimeVersion": "2026.6.1",
  "sessionKey": "main",
  "talkConfig": {
    "provider": "openai",
    "mode": "realtime",
    "transport": "webrtc",
    "brain": "agent-consult",
    "model": "gpt-realtime-2",
    "voice": "cedar",
    "hasConfiguredApiKey": false
  },
  "talkCatalog": {
    "activeProvider": "openai",
    "provider": "openai",
    "configured": true,
    "modes": ["realtime"],
    "transports": ["webrtc", "gateway-relay"],
    "brains": ["agent-consult"],
    "supportsBrowserSession": true,
    "supportsToolCalls": true
  },
  "results": [
    {
      "requestedModel": "gpt-realtime-2",
      "sessionModel": "gpt-realtime-2",
      "provider": "openai",
      "transport": "webrtc",
      "offerUrl": "https://api.openai.com/v1/realtime/calls",
      "iceMode": "immediate",
      "status": 500,
      "ok": false,
      "body": "Internal Server Error"
    },
    {
      "requestedModel": "gpt-realtime-2",
      "sessionModel": "gpt-realtime-2",
      "provider": "openai",
      "transport": "webrtc",
      "offerUrl": "https://api.openai.com/v1/realtime/calls",
      "iceMode": "ice-complete",
      "status": 500,
      "ok": false,
      "body": "Internal Server Error"
    },
    {
      "requestedModel": "gpt-realtime",
      "sessionModel": "gpt-realtime",
      "provider": "openai",
      "transport": "webrtc",
      "offerUrl": "https://api.openai.com/v1/realtime/calls",
      "iceMode": "immediate",
      "status": 500,
      "ok": false,
      "body": "Internal Server Error"
    },
    {
      "requestedModel": "gpt-realtime",
      "sessionModel": "gpt-realtime",
      "provider": "openai",
      "transport": "webrtc",
      "offerUrl": "https://api.openai.com/v1/realtime/calls",
      "iceMode": "ice-complete",
      "status": 500,
      "ok": false,
      "body": "Internal Server Error"
    }
  ],
  "diagnosis": {
    "status": "blocked-upstream",
    "summary": "Gateway can mint OpenAI OAuth-backed Realtime client sessions, but OpenAI rejects every media handshake with HTTP 500.",
    "evidence": [
      "talk.config has no configured OpenAI provider API key.",
      "talk.catalog reports OpenAI Realtime configured with WebRTC support.",
      "talk.client.create returned Realtime session metadata for every tested model.",
      "Every tested browser SDP offer to /v1/realtime/calls returned HTTP 500."
    ]
  }
}

Secondary relay audit result on the same installed Gateway:

{
  "runtimeVersion": "2026.6.1",
  "hasOpenAIApiKeyEnv": false,
  "talkConfig": {
    "provider": "openai",
    "mode": "realtime",
    "transport": "webrtc",
    "brain": "agent-consult",
    "model": "gpt-realtime-2",
    "voice": "cedar",
    "hasConfiguredApiKey": false
  },
  "talkCatalog": {
    "activeProvider": "openai",
    "provider": "openai",
    "configured": true,
    "supportsBrowserSession": true,
    "supportsToolCalls": true
  },
  "create": {
    "provider": "openai",
    "transport": "gateway-relay",
    "mode": "realtime",
    "brain": "agent-consult"
  },
  "ready": false,
  "closeBeforeReadyReason": "completed",
  "errorBeforeReadyMessage": null,
  "diagnosis": {
    "status": "blocked-upstream",
    "summary": "Gateway relay can create a no-key OAuth-backed Realtime session, but the provider connection fails before relay ready."
  }
}

Diagnostics export was generated locally for the installed Gateway:

openclaw-diagnostics-2026-06-04T20-07-57-876Z-4051289.zip

I can attach it if useful after reviewing the redacted contents.

Impact and severity

Affected: OpenClaw Talk users trying to use OpenAI Realtime through OpenAI OAuth without configuring a standard OpenAI API key.

Severity: High for this workflow; it blocks live Realtime audio.

Frequency: 4/4 WebRTC media handshake attempts and 1/1 relay attempt in this repro.

Consequence: OAuth/no-key OpenAI Realtime Talk appears configured and can create sessions, but audio never becomes ready.

Additional information

Related but not exact duplicates found during local issue search:

Last known good / first known bad version: NOT_ENOUGH_INFO.

Activity

  1. clawsweeper commented on Jun 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 4:17 PM ET / 20:17 UTC.

    Summary
    Keep open: current main still advertises and creates OpenAI OAuth-backed Realtime Talk sessions without proving the /v1/realtime/calls media handshake works, and the related docs work only clarified Platform billing rather than resolving this HTTP 500 failure mode.

    Reproducibility: yes. for the OpenClaw readiness/reporting side: current source shows OAuth can mark OpenAI Realtime configured and create a WebRTC session without a media-handshake audit. No for the actual OpenAI HTTP 500, because this read-only review did not run a live OAuth Realtime call.

    Next step
    This is not a safe autonomous fix yet because it needs live OpenAI Realtime OAuth proof and a maintainer decision on the supported auth/readiness contract.

    Review details

    Best possible solution:

    Keep the issue open until maintainers decide the supported OpenAI Realtime auth contract, then either prove OAuth-backed /v1/realtime/calls works in a live audit or gate/error the no-key OAuth path with clear user guidance and regression coverage.

    Do we have a high-confidence way to reproduce the issue?

    Yes for the OpenClaw readiness/reporting side: current source shows OAuth can mark OpenAI Realtime configured and create a WebRTC session without a media-handshake audit. No for the actual OpenAI HTTP 500, because this read-only review did not run a live OAuth Realtime call.

    Is this the best way to solve the issue?

    Unclear; the current behavior is not enough to close because it can advertise and mint sessions for a path reported to fail. The best fix depends on whether maintainers want OAuth-backed Realtime to remain supported with live proof or fail closed toward a direct funded Platform API key.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The reported upstream HTTP 500 was not live-reproduced in this read-only review; local source proof covers OpenClaw readiness/session behavior, not the provider's actual response.
    • Changing configured or browser-session support for OAuth-backed Realtime could break any users whose OAuth organization can complete the media path, so the fix direction needs provider-contract review and live proof.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 0f73e0976994.

    Label changes

    Label changes:

    • add P1: The report blocks a current installed-release OpenAI Realtime Talk workflow after OpenClaw says the provider is configured.
    • add impact:auth-provider: The failure depends on OpenAI OAuth versus direct Platform API-key routing for Realtime Talk credentials.
    • add issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.
    • add clawsweeper:needs-live-repro: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.
    • add clawsweeper:needs-product-decision: Current issue advisory state selects this label.

    Label justifications:

    • P1: The report blocks a current installed-release OpenAI Realtime Talk workflow after OpenClaw says the provider is configured.
    • impact:auth-provider: The failure depends on OpenAI OAuth versus direct Platform API-key routing for Realtime Talk credentials.
    Evidence reviewed

    Acceptance criteria:

    • Live OpenAI Realtime OAuth/no-key WebRTC audit for /v1/realtime/client_secrets plus /v1/realtime/calls with redacted output.
    • Focused regression tests around extensions/openai/realtime-voice-provider.test.ts for whichever auth/readiness contract maintainers choose.
    • Focused Gateway catalog/client tests in src/gateway/server-methods/talk.test.ts if catalog or talk.client.create behavior changes.

    What I checked:

    • OAuth marks OpenAI Realtime as configured: hasOpenAIRealtimeBrowserAuthInput returns true when an openai auth profile is configured for GPT realtime models, even without a direct API key. (extensions/openai/realtime-voice-provider.ts:393, 0f73e0976994)
    • Browser session returns the failing media endpoint: createOpenAIRealtimeBrowserSession mints a Realtime client secret from the resolved auth value and returns offerUrl: "https://api.openai.com/v1/realtime/calls"; there is no live SDP/audit gate before returning the session metadata. (extensions/openai/realtime-voice-provider.ts:1413, 0f73e0976994)
    • Catalog advertises configured browser support: talk.catalog reports each realtime provider's configured status from provider.isConfigured and supportsBrowserSession from capabilities or createBrowserSession, matching the reporter's observed catalog output. (src/gateway/server-methods/talk.ts:254, 0f73e0976994)
    • Client create returns provider session metadata: talk.client.create calls createBrowserSession and responds with the provider session when the requested transport matches, so the Gateway can report success before the browser performs /v1/realtime/calls. (src/gateway/server-methods/talk-client.ts:128, 0f73e0976994)
    • Tests encode OAuth-backed browser-session support: Current tests assert that OpenAI OAuth profiles count as configured and that browser realtime client secrets are minted when no API key is set, so this is intended current behavior rather than an accidental local report artifact. (extensions/openai/realtime-voice-provider.test.ts:585, 0f73e0976994)
    • Shipped docs clarify billing but still describe OAuth as accepted: The shipped OpenAI provider docs say Realtime accepts either a Platform API key or an openai OAuth profile whose organization has Platform billing; that explains billing but does not prove the reported OAuth/no-key /v1/realtime/calls media path succeeds. Public docs: docs/providers/openai.md. (docs/providers/openai.md:111, 2e08f0f4221f)

    Likely related people:

    • steipete: Current blame for the OpenAI Realtime browser-session/auth and Talk catalog lines maps to Peter Steinberger, and the related merged OpenAI provider identity PR in the supplied context was authored by steipete. (role: recent area contributor; confidence: high; commits: a1c6a6e36f77, 4c33aaa86c16; files: extensions/openai/realtime-voice-provider.ts, src/gateway/server-methods/talk.ts)
    • lonexreb: The supplied related context shows lonexreb authored the merged docs PR that clarified OpenAI Realtime Platform billing for the same provider surface. (role: adjacent docs contributor; confidence: medium; commits: 717003aaffec; files: docs/providers/openai.md)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 4, 2026
  3. self-assigned this
    on Jun 8, 2026
  4. joshavant commented on Jun 9, 2026

    @joshavant
    Collaborator

    Thanks @sergiopesch for the detailed 2026.6.1 repro and the clean audit output. That made the failure mode clear.

    This is fixed by #91567, merged as 9fdd56d. The root issue was that OpenClaw treated an openai OAuth profile as sufficient to configure OpenAI Realtime voice. That let talk.catalog report OpenAI Realtime as configured and let talk.client.create return browser WebRTC session metadata, but the actual OpenAI Realtime media leg at /v1/realtime/calls requires OpenAI Platform API-key-backed credentials, so OAuth-only setups reached a doomed handshake.

    The fix changes OpenAI Realtime voice to require one of:

    • an openai API-key auth profile,
    • talk.realtime.providers.openai.apiKey,
    • plugins.entries.voice-call.config.realtime.providers.openai.apiKey,
    • or OPENAI_API_KEY.

    OpenAI OAuth profiles still work for Codex-backed openai/* chat models, but they no longer configure Realtime voice. With an OAuth-only setup, OpenClaw now reports OpenAI Realtime as unconfigured and fails before returning a WebRTC session, instead of advertising a media-ready session that later fails at OpenAI.

    Validation included focused tests for the Realtime credential paths and an AWS Crabbox Gateway repro of the OAuth-only case: talk.catalog returned configured=false, talk.client.create failed with UNAVAILABLE, and no WebRTC session was returned.

    Closing as fixed. If anyone still sees OpenAI Realtime fail with a funded OpenAI Platform API key or openai API-key auth profile configured, please open a new issue with the updated Gateway logs and Talk config shape.

  5. locked as resolved and limited conversation to collaborators on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions