Skip to content

Add OAuth-backed realtime voice controls - #79138

Merged
steipete merged 5 commits into
openclaw:mainfrom
Solvely-Colin:Solvely/realtime-voice-oauth-control-ui
May 10, 2026
Merged

steipete merged 5 commits into
openclaw:mainfrom
Solvely-Colin:Solvely/realtime-voice-oauth-control-ui

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add openai-codex OAuth-backed auth for native OpenAI realtime voice in browser Talk, Gateway relay/Voice Call realtime bridges, and OpenAI realtime transcription when no direct OpenAI API key is configured.
  • Update OpenAI realtime session payloads for the current native Realtime API while preserving Azure deployment-compatible bridge payloads, default OpenAI realtime voice to gpt-realtime-2, and remove native OpenAI realtime temperature usage.
  • Expose Control UI Talk launch options for provider, transport, model, voice, reasoning effort, VAD threshold, silence duration, and prefix padding, then pass them through WebRTC and Gateway relay paths.
  • Carry realtime config/context through Google Meet, Voice Call, relay, and transcription surfaces, including Google Meet test_speech mode: "bidi" coverage.

Why

OAuth-only OpenAI/Codex setups could not use realtime Talk or backend realtime bridges because those paths required a direct OpenAI API key. The Control UI also had no way to choose provider/model/voice/transport/VAD options at launch time, which made live voice testing and provider comparison much rougher than it needed to be.

Real Behavior Proof

  • Behavior or issue addressed: OAuth-only OpenAI/Codex setups could not use realtime Talk or backend realtime bridges without a direct OpenAI API key, and Control UI Talk had no launch-time options for provider, transport, model, voice, reasoning, or VAD tuning.

  • Real environment tested: configured local OpenClaw runtime host running the Control UI and OpenAI realtime voice with OAuth auth available; direct OpenAI API-key env was deliberately unset for the proof. Supplemental Linux validation ran on an owned static SSH Crabbox host with no live OpenClaw auth state.

  • Exact steps or command run after this patch: started the local OpenClaw dashboard/gateway, opened Control UI, launched browser Talk with the new OpenAI realtime options, talked back and forth successfully, then ran a redacted one-off runtime smoke with direct API-key env removed. Also ran the targeted realtime voice/OpenAI/Google Meet Vitest set on Crabbox Linux.

  • Evidence after fix: after-fix screenshot of the actual Control UI Talk options panel from the tested setup, plus redacted live runtime output showing OAuth-backed OpenAI realtime bridge/WebRTC connection states. No credential values, tokens, profile IDs, email addresses, bearer headers, client-secret values, or auth-file contents are included.

    openclaw-control-ui-voice-pr

    Redacted live output summary: directOpenAIKeyEnv=false; configuredViaAuthProfile=true; bridge server events session.created -> session.updated; browser WebRTC answerHasAudio=true; remoteDescriptionApplied=true; connectionState=connected.

  • Observed result after fix: browser realtime Talk connected and worked manually in the UI using the OAuth path; the options panel was visible and usable; the backend realtime bridge reached ready state through OAuth-backed auth; the browser WebRTC path completed SDP negotiation and connected.

  • What was not tested: no fresh live Google Meet join in the final pass; no live Azure OpenAI realtime call in the final pass; no live OAuth realtime run on Crabbox because the static host has no OpenClaw auth state for the Crabbox user.

Validation

  • pnpm test extensions/openai/realtime-voice-provider.test.ts extensions/openai/realtime-transcription-provider.test.ts src/realtime-transcription/websocket-session.test.ts ui/src/ui/realtime-talk.test.ts ui/src/ui/realtime-talk-gateway-relay.test.ts ui/src/ui/views/chat.test.ts
  • pnpm check:changed
  • codex review --base origin/main returned no high-confidence findings. Its internal sandbox could not create the repo heavy-check lock under .git, so the focused test command above was run separately with normal repo lock access.
  • Crabbox Linux targeted proof: pnpm crabbox:run -- --provider ssh --no-sync --timing-json --shell -- 'PATH="$PWD/.crabbox-bin:$PATH" OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/openai/realtime-voice-provider.test.ts extensions/openai/realtime-transcription-provider.test.ts src/gateway/talk-realtime-relay.test.ts src/gateway/talk-transcription-relay.test.ts ui/src/ui/realtime-talk-gateway-relay.test.ts ui/src/ui/realtime-talk.test.ts extensions/google-meet/index.test.ts extensions/google-meet/src/cli.test.ts' passed 4 Vitest shards / 176 tests on the owned static SSH Crabbox host.

Screenshots

Before: the Chat composer had no Talk options panel to capture.

After:

openclaw-control-ui-voice-pr

AI Assistance

AI-assisted with Codex. Human live-tested browser Talk and uploaded the Control UI screenshot.

Not Tested / Limits

  • No fresh live Google Meet join in the final pass; Google Meet bidi/test-speech and bridge plumbing are covered by focused tests.
  • No live Azure OpenAI realtime call in the final pass; regression tests cover Azure configured/auth behavior and Azure deployment-compatible payload shape.
  • No live OAuth realtime run on Crabbox because the static host has no OpenClaw auth state for the crabbox user; local live runtime proof covers the OAuth-backed OpenAI realtime connection.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts extensions: openai plugin: google-meet size: XL triage: dirty-candidate Candidate: broad unrelated surfaces; may need splitting or cleanup. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 7, 2026
@clawsweeper

clawsweeper Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The branch adds OAuth-backed OpenAI realtime voice/transcription fallback, Control UI Talk launch options, updated realtime payload defaults, and config propagation through Talk, Gateway relay, Voice Call, Google Meet, docs, tests, and Swift protocol models.

Reproducibility: yes. from source inspection: current main's browser realtime and realtime transcription paths require direct OpenAI API key configuration, and the Talk protocol/UI lack the new launch option fields. I did not run a live current-main OAuth-only failure path.

Real behavior proof
Sufficient (live_output): The PR body contains after-fix real setup proof with a visible UI screenshot and redacted live output for OAuth-backed bridge/WebRTC connection states, so the browser runtime proof is not screenshot-only.

Next step before merge
This is a broad product/runtime PR with supplied proof and no narrow automated repair blocker; the next step is maintainer ownership review, exact-head CI, and merge judgment.

Security
Cleared: No concrete security or supply-chain regression was found in the provided diff; it adds no dependencies, workflow changes, lockfile changes, or lifecycle hooks and uses existing auth and guarded fetch seams.

Review details

Best possible solution:

Land or request changes on a maintainer-reviewed version that keeps OAuth limited to native OpenAI realtime endpoints, preserves direct-key behavior for Azure/custom endpoints, and carries typed launch context through the existing provider seams with regression coverage.

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

Yes from source inspection: current main's browser realtime and realtime transcription paths require direct OpenAI API key configuration, and the Talk protocol/UI lack the new launch option fields. I did not run a live current-main OAuth-only failure path.

Is this the best way to solve the issue?

Yes, subject to maintainer product acceptance. The latest PR direction uses existing auth/profile and provider seams, appears to address the earlier review blockers, and includes tests plus after-fix runtime proof, but its cross-surface scope still needs owner review.

Acceptance criteria:

  • pnpm test extensions/openai/realtime-voice-provider.test.ts extensions/openai/realtime-transcription-provider.test.ts src/realtime-transcription/websocket-session.test.ts src/gateway/talk-realtime-relay.test.ts src/gateway/talk-transcription-relay.test.ts ui/src/ui/realtime-talk.test.ts ui/src/ui/realtime-talk-gateway-relay.test.ts ui/src/ui/views/chat.test.ts extensions/google-meet/index.test.ts extensions/google-meet/src/cli.test.ts
  • pnpm check:changed

What I checked:

  • PR head and scope: The GitHub context for Add OAuth-backed realtime voice controls #79138 shows an open, unmerged PR at head 2ef17aa with 43 changed files and 2066 additions across OpenAI, Gateway, Voice Call, Google Meet, UI, docs, tests, and Swift protocol models. (2ef17aab4de9)
  • Current-main direct-key requirement: On current main, OpenAI realtime browser sessions still require a resolved direct API key before creating the Realtime client-secret session, so the OAuth-only behavior proposed by this PR is not already implemented. (extensions/openai/realtime-voice-provider.ts:1000, 76b64d76b5dc)
  • Current-main transcription configuration: On current main, the OpenAI realtime transcription provider reports configured status only when provider config or OPENAI_API_KEY has a key; it has no openai-codex OAuth profile path. (extensions/openai/realtime-transcription-provider.ts:76, 76b64d76b5dc)
  • Protocol and UI launch options are new: Current main Talk protocol schemas expose provider/model/voice/mode/transport/brain only, while the PR adds VAD threshold, silence duration, prefix padding, and reasoning effort parameters plus UI controls for those fields. (src/gateway/protocol/schema/channels.ts:156, 76b64d76b5dc)
  • Prior actionable review comments appear addressed in latest PR diff: The provided latest diff includes field picking in buildRealtimeVoiceLaunchOptions, Azure/custom endpoint guard behavior described by the PR commits and tests, and cfg propagation into Google Meet realtime bridge paths, matching the earlier review comments about over-broad launch options, Azure OAuth fallback, and missing bridge auth context. (src/gateway/server-methods/talk-shared.ts:221, 2ef17aab4de9)
  • Real behavior proof in PR body: The PR body includes an after-fix Control UI screenshot and redacted live output showing directOpenAIKeyEnv=false, OAuth profile configuration, session.created/session.updated, answerHasAudio=true, remoteDescriptionApplied=true, and WebRTC connectionState=connected. (2ef17aab4de9)

Likely related people:

  • steipete: Recent main history repeatedly touches OpenAI realtime voice, Talk session/client plumbing, and Google Meet realtime paths affected by this PR. (role: recent area contributor; confidence: high; commits: 8c48ebc5ddf1, 6a2260eac0b4, 63ec912786b2; files: extensions/openai/realtime-voice-provider.ts, src/gateway/server-methods/talk-client.ts, src/gateway/talk-realtime-relay.ts)
  • vincentkoc: Recent commits in the same history cover realtime transcription readiness, Voice Call realtime lifecycle, and audio pacing adjacent to the backend bridge and transcription paths touched here. (role: recent realtime stability contributor; confidence: medium; commits: 16321a27b64c, 7050af56d400, 85a3426f0e26; files: extensions/openai/realtime-voice-provider.ts, src/gateway/talk-realtime-relay.ts)
  • VACInc: Recent main history shows adjacent work on Talk client/session and realtime relay surfaces that this PR extends. (role: adjacent Talk/runtime contributor; confidence: medium; commits: 49c870b8d240; files: src/gateway/server-methods/talk-client.ts, src/gateway/talk-realtime-relay.ts)
  • scoootscooob: Recent history includes adjacent UI or runtime changes in the Talk and Control UI paths where this PR adds launch controls. (role: adjacent UI/runtime contributor; confidence: low; commits: 7f6de09e7d99; files: ui/src/ui/chat/realtime-talk.ts, ui/src/ui/views/chat.ts)

Remaining risk / open question:

  • The PR is broad and cross-surface; final merge should be gated by maintainer ownership review and exact-head CI because current local review did not rerun the submitted test matrix.
  • The PR body explicitly says fresh live Google Meet join and live Azure OpenAI realtime were not tested in the final pass, so maintainers may want targeted owner review for those integrations.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 76b64d76b5dc.

Re-review progress:

@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from b8fb055 to f7a844f Compare May 8, 2026 00:34
@Solvely-Colin
Solvely-Colin marked this pull request as ready for review May 8, 2026 00:37
Copilot AI review requested due to automatic review settings May 8, 2026 00:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends OpenClaw’s realtime voice stack to support OAuth-only OpenAI/Codex setups (no direct API key), modernizes OpenAI Realtime session payloads (while keeping Azure deployment compatibility), and adds Control UI “Talk options” to select provider/transport/model/voice/VAD/reasoning at launch.

Changes:

  • Add OAuth-backed auth fallback for OpenAI realtime voice bridges and realtime transcription when no direct API key is configured.
  • Add Control UI Talk launch options and propagate those options through browser/WebRTC, gateway relay, voice-call, and Meet bidi/test-speech surfaces.
  • Update OpenAI Realtime session payload shape/defaults (default model gpt-realtime-2, remove native temperature, add reasoning/VAD fields, preserve Azure deployment payload shape).

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/src/ui/views/chat.ts Add Talk options UI panel and toggle button.
ui/src/ui/views/chat.test.ts Add coverage for Talk options presence and editing.
ui/src/ui/realtime-talk.test.ts Assert launch options are forwarded to session creation RPC.
ui/src/ui/realtime-talk-gateway-relay.test.ts Add relay shutdown/error propagation regression tests.
ui/src/ui/chat/realtime-talk.ts Add typed launch options and pass through RPC payloads.
ui/src/ui/chat/realtime-talk-gateway-relay.ts Harden relay stop/error handling and preserve error details.
ui/src/ui/app.ts Maintain Talk option state and build typed launch options for sessions.
ui/src/ui/app-view-state.ts Add Talk options state/update method to view state contract.
ui/src/ui/app-render.ts Wire Talk options props and handlers into Chat render.
ui/src/styles/chat/layout.css Add layout/styling for Talk options panel.
src/talk/session-runtime.ts Thread full runtime config into realtime voice bridge creation.
src/talk/session-runtime.test.ts Verify cfg is passed through to provider bridge callbacks.
src/talk/provider-types.ts Extend provider request types with cfg + additional launch fields.
src/realtime-transcription/websocket-session.ts Allow async URL/header resolution before opening WebSocket.
src/realtime-transcription/websocket-session.test.ts Add tests for async URL/headers and close/timeout races.
src/realtime-transcription/provider-types.ts Add cfg to transcription session creation request.
src/gateway/talk-transcription-relay.ts Pass runtime config into transcription provider session creation.
src/gateway/talk-transcription-relay.test.ts Update relay tests for new context.getRuntimeConfig usage.
src/gateway/talk-realtime-relay.ts Ensure unified talk sessions are forgotten on relay close/cleanup; pass cfg into bridge creation.
src/gateway/server-methods/talk.test.ts Extend handler tests to include VAD/prefix/reasoning inputs.
src/gateway/server-methods/talk-shared.ts Add helper to compute realtime voice launch option overrides.
src/gateway/server-methods/talk-session.ts Apply launch options to gateway-relay realtime session creation.
src/gateway/server-methods/talk-client.ts Apply launch options to client-owned realtime session creation.
src/gateway/protocol/schema/channels.ts Extend gateway schemas with VAD/silence/prefix/reasoning params.
scripts/dev/realtime-talk-live-smoke.ts Update live smoke script defaults + event/method names.
extensions/voice-call/src/webhook/realtime-handler.ts Pass core runtime config into backend realtime bridge creation.
extensions/voice-call/src/webhook.ts Provide cfg to streaming/transcription config for OAuth resolution.
extensions/voice-call/src/runtime.ts Thread cfg into realtime call handler construction.
extensions/voice-call/src/media-stream.ts Pass cfg into realtime transcription provider session creation.
extensions/openai/realtime-voice-provider.ts Add OAuth fallback via client_secret minting; update session payload shape; add reasoning/VAD options; validate voice list; default model gpt-realtime-2.
extensions/openai/realtime-voice-provider.test.ts Add/adjust tests for OAuth minting, payload shape changes, and Azure deployment compatibility.
extensions/openai/realtime-transcription-provider.ts Add OAuth fallback via transcription_session client_secret minting; use async headers resolution.
extensions/openai/realtime-transcription-provider.test.ts Add tests for OAuth-configured behavior and minted secrets.
extensions/openai/realtime-provider-shared.ts Factor shared “mint realtime secret” helper for voice/transcription flows.
extensions/google-meet/src/runtime.ts Respect requested mode for test_speech (including bidi) and adjust health refresh behavior.
extensions/google-meet/src/realtime.ts Pass full config into transcription provider for OAuth resolution.
extensions/google-meet/src/realtime-node.ts Pass full config into transcription provider for OAuth resolution (node bridge).
extensions/google-meet/src/cli.test.ts Add CLI coverage ensuring test-speech mode is delegated to gateway runtime.
extensions/google-meet/index.test.ts Update tests for new status/health behavior and bidi test-speech mode.
docs/web/control-ui.md Document OAuth support + new Talk options panel behavior.
docs/providers/openai.md Document OAuth support, new default model, voice constraints, and new option fields.
CHANGELOG.md Add release note entry for OAuth realtime + Talk options + Meet bidi test-speech.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7a844faea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from f7a844f to 3662ef1 Compare May 8, 2026 00:45
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 8, 2026
@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from 3662ef1 to 08355d3 Compare May 8, 2026 00:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08355d3c7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from 9396bd8 to 19554f5 Compare May 8, 2026 01:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19554f5b4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. proof: supplied External PR includes structured after-fix real behavior proof. and removed proof: supplied External PR includes structured after-fix real behavior proof. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 8, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 8, 2026
@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from e7853b5 to ea08ef6 Compare May 9, 2026 22:36
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 9, 2026
@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from ea08ef6 to fedccf6 Compare May 10, 2026 03:53
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@Solvely-Colin
Solvely-Colin force-pushed the Solvely/realtime-voice-oauth-control-ui branch from fedccf6 to 2ef17aa Compare May 10, 2026 03:55
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@steipete
steipete merged commit 6481021 into openclaw:main May 10, 2026
113 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Landed via rebase merge onto main.

Proof:

  • PR head 2ef17aab4de975f25e13aa5c79743223e6511149: GitHub check, checks-node-core, check-docs, critical/security shards, and Real behavior proof green.
  • Local landing sanity: git diff --check origin/main...refs/remotes/pr/79138 clean before merge.
  • Landed main SHA: 6481021763f90eb66aefe8c5b0949ad90db6791b.

Thanks @Solvely-Colin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation extensions: openai gateway Gateway runtime plugin: google-meet proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. scripts Repository scripts size: XL triage: dirty-candidate Candidate: broad unrelated surfaces; may need splitting or cleanup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants