openclaw - 💡(How to fix) Fix Control UI Realtime Talk: CSP blocks OpenAI WebRTC and UI hides realtime audio errors [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73427Fetched 2026-04-29 06:20:03
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1cross-referenced ×1

On OpenClaw 2026.4.26, the Control UI Realtime Talk flow can fail in two hard-to-debug ways when using the bundled OpenAI realtime browser provider.

  1. The Control UI CSP only allowed connect-src 'self' ws: wss:. The browser WebRTC setup posts the SDP offer directly to https://api.openai.com/v1/realtime/calls, so Chrome blocks the request unless https://api.openai.com is added to connect-src.
  2. After patching CSP locally, the dashboard can show Talk live while the user gets no spoken response. The bundled WebRTC client only handles transcript and function-call events from the oai-events data channel. It ignores error, speech start/stop, response lifecycle, and other diagnostic events, so the UI provides no actionable failure state.

Error Message

  1. After patching CSP locally, the dashboard can show Talk live while the user gets no spoken response. The bundled WebRTC client only handles transcript and function-call events from the oai-events data channel. It ignores error, speech start/stop, response lifecycle, and other diagnostic events, so the UI provides no actionable failure state.
  • The UI should surface realtime error events and at least basic speech/response lifecycle status so users are not left staring at Talk live with no reply.

Root Cause

  1. Configure OpenAI realtime credentials so talk.realtime.session returns a WebRTC session.
  2. Open the Control UI.
  3. Click the Realtime Talk button.
  4. Observe CSP failure before patching connect-src.
  5. After patching CSP, the WebRTC session can connect, but realtime API errors / VAD failures are swallowed by the UI because the data-channel handler ignores them.

Fix Action

Fix / Workaround

  1. The Control UI CSP only allowed connect-src 'self' ws: wss:. The browser WebRTC setup posts the SDP offer directly to https://api.openai.com/v1/realtime/calls, so Chrome blocks the request unless https://api.openai.com is added to connect-src.

  2. After patching CSP locally, the dashboard can show Talk live while the user gets no spoken response. The bundled WebRTC client only handles transcript and function-call events from the oai-events data channel. It ignores error, speech start/stop, response lifecycle, and other diagnostic events, so the UI provides no actionable failure state.

  3. Configure OpenAI realtime credentials so talk.realtime.session returns a WebRTC session.

  4. Open the Control UI.

  5. Click the Realtime Talk button.

  6. Observe CSP failure before patching connect-src.

  7. After patching CSP, the WebRTC session can connect, but realtime API errors / VAD failures are swallowed by the UI because the data-channel handler ignores them.

Local workaround used

Code Example

audio: {
  input: {
    turn_detection: {
      type: "server_vad",
      create_response: true,
      interrupt_response: true
    },
    transcription: { model: "whisper-1" }
  },
  output: { voice }
}
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.4.26, the Control UI Realtime Talk flow can fail in two hard-to-debug ways when using the bundled OpenAI realtime browser provider.

  1. The Control UI CSP only allowed connect-src 'self' ws: wss:. The browser WebRTC setup posts the SDP offer directly to https://api.openai.com/v1/realtime/calls, so Chrome blocks the request unless https://api.openai.com is added to connect-src.
  2. After patching CSP locally, the dashboard can show Talk live while the user gets no spoken response. The bundled WebRTC client only handles transcript and function-call events from the oai-events data channel. It ignores error, speech start/stop, response lifecycle, and other diagnostic events, so the UI provides no actionable failure state.

Environment

  • OpenClaw: 2026.4.26 / be8c246
  • Install path: npm/Homebrew global install
  • Browser: Chrome 147 on macOS
  • Provider: bundled OpenAI realtime browser provider (transport: webrtc-sdp, model gpt-realtime-1.5)

Repro

  1. Configure OpenAI realtime credentials so talk.realtime.session returns a WebRTC session.
  2. Open the Control UI.
  3. Click the Realtime Talk button.
  4. Observe CSP failure before patching connect-src.
  5. After patching CSP, the WebRTC session can connect, but realtime API errors / VAD failures are swallowed by the UI because the data-channel handler ignores them.

Expected

  • Control UI CSP should allow the OpenAI realtime call endpoint when the OpenAI realtime provider is available, likely connect-src ... https://api.openai.com.
  • The WebRTC session should be created with explicit audio input settings for browser speech-to-speech sessions, including server VAD / auto response settings.
  • The UI should surface realtime error events and at least basic speech/response lifecycle status so users are not left staring at Talk live with no reply.

Local workaround used

Patched the installed bundle locally to add https://api.openai.com to connect-src, and patched the OpenAI browser session minting payload to include explicit audio input config:

audio: {
  input: {
    turn_detection: {
      type: "server_vad",
      create_response: true,
      interrupt_response: true
    },
    transcription: { model: "whisper-1" }
  },
  output: { voice }
}

This confirms the API key/session mint path is healthy, but the fix should live upstream because upgrades overwrite the bundled files.

extent analysis

TL;DR

Update the Control UI's Content Security Policy (CSP) to include https://api.openai.com in the connect-src directive and modify the WebRTC client to handle additional event types for better error handling and user feedback.

Guidance

  • Verify that the connect-src directive in the Control UI's CSP is updated to include https://api.openai.com to allow the browser to make requests to the OpenAI realtime call endpoint.
  • Modify the WebRTC client to handle error, speech start/stop, response lifecycle, and other diagnostic events from the oai-events data channel to provide actionable failure states and improve user experience.
  • Consider adding explicit audio input settings for browser speech-to-speech sessions, including server VAD and auto response settings, to the WebRTC session creation process.
  • Test the updated configuration with the OpenAI realtime browser provider to ensure that the Control UI can establish a successful WebRTC session and handle errors correctly.

Example

// Example of updated audio input config for WebRTC session creation
audio: {
  input: {
    turn_detection: {
      type: "server_vad",
      create_response: true,
      interrupt_response: true
    },
    transcription: { model: "whisper-1" }
  },
  output: { voice }
}

Notes

The provided local workaround confirms that the API key/session mint path is healthy, but the fix should be applied upstream to ensure that it persists across upgrades.

Recommendation

Apply the workaround by updating the Control UI's CSP and modifying the WebRTC client to handle additional event types, as this will provide a more robust and user-friendly experience for the Realtime Talk feature.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Control UI Realtime Talk: CSP blocks OpenAI WebRTC and UI hides realtime audio errors [1 comments, 2 participants]