Skip to content

feat(talk): support GPT-Live realtime voice over ChatGPT OAuth - #115226

Merged
steipete merged 14 commits into
mainfrom
steipete/realtime-gpt-live-1-1d214b
Jul 28, 2026
Merged

steipete merged 14 commits into
mainfrom
steipete/realtime-gpt-live-1-1d214b

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #104683
Related: #115021

What Problem This Solves

Talk users on a ChatGPT subscription could not use OpenAI's GPT-Live voice models. Setting
talk.realtime.model to a GPT-Live value failed closed with "GPT-Live models are not
supported for Talk browser sessions yet", so the only realtime option was the GA
gpt-realtime-2.1 family.

GPT-Live is a different product experience, not a faster GA model. The voice layer is
full-duplex and holds the conversation continuously while real work runs in the
background: it has no tools of its own and instead delegates tasks to the client, which
streams results back into the live session. That means an agent task can run for minutes
without the conversation going dead, which the GA tool-call flow cannot do.

Why This Change Was Made

The Gateway now creates the WebRTC call and owns the sideband control socket for GPT-Live
sessions, so the browser never holds upstream credentials. When the voice model emits a
delegation, the Gateway runs it through the existing OpenClaw agent-consult runtime — the
same runtime and session the GA tool path uses — and streams the answer back as speakable
context.

Two boundaries were needed and are included. Providers can now receive an injected
runAgentConsult callback, so a provider whose protocol delegates through its own control
channel can reach the agent without a client round-trip. And the Gateway's canonical
browser-origin decision is now exported through openclaw/plugin-sdk/webhook-request-guards,
because the plugin offer routes previously accepted only origins listed verbatim in
gateway.controlUi.allowedOrigins and would 403 private LAN/Tailnet Control UI sessions
that the Gateway itself accepts. The bundled Codex realtime broker is migrated onto that
same seam, which fixes the identical latent bug there.

Scope is deliberately narrow: Talk browser sessions over WebRTC. Telephony/voice-call,
gateway-relay, and Android are unchanged and still reject GPT-Live, because GPT-Live
is WebRTC-only.

User Impact

Operators with a ChatGPT OAuth (subscription) auth profile can set
talk.realtime.model: "GPT-Live" and hold a full-duplex voice conversation in the
web Control UI while the OpenClaw agent does the work behind it. No new configuration keys.
Web, macOS, and the Linux desktop app work as-is; the macOS and Tauri apps inherit it
through the embedded Control UI.

Platform API keys do not work for this route yet — /v1/live access for platform keys is
waitlist-gated and returns model_not_found — so GPT-Live selects the ChatGPT OAuth
profile first and falls back to a platform key only if no OAuth profile exists. GA realtime
behavior and auth precedence are untouched.

Evidence

Live end-to-end, ChatGPT Pro OAuth profile, 2026-07-28. An opt-in live test
(OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_GPT_LIVE=1) builds a real Chromium WebRTC offer,
calls our own multipart helper, applies the answer, joins our own sideband, and asserts a
matching session.started before closing. It skips cleanly with no OAuth profile.

POST https://api.openai.com/v1/live   (multipart: sdp + session)
  -> 201, location: /v1/live/rtc_u7_..., answer SDP (1265 bytes)
wss://api.openai.com/v1/live/<call_id>
  -> {"type":"session.started","session":{"model":"GPT-Live", ...}}

Focused tests: 228 passing across the touched surfaces (GPT-Live session 44,
wire 8, provider 81, routing guard 4, Talk gateway/consult/resolver 92), plus the Codex
broker (11) and Gateway origin (31) suites after the SDK migration. SDK surface check
passes at 4,741 public / 2,870 callable exports.

Wire contract was extracted from openai/codex codex-rs at 899539c03a and
cross-checked against the independent MIT client can1357/oh-my-pi, then verified by live
probing. Three findings from probing overruled both reference clients and are worth
knowing:

  • The chatgpt.com/backend-api/codex/realtime/calls route returns 403 Voice session access denied for every model and both protocol versions. api.openai.com/v1/live with
    the OAuth bearer plus chatgpt-account-id is the route that works. Upstream codex picks
    its endpoint from the auth mode's base URL, so it lands on the failing route with ChatGPT
    auth — its own client reproduces the 403.
  • That same 403 is also what an invalid voice returns, so it must not be read as an
    account entitlement block. The accepted voices are exactly alloy, ash, ballad, cedar, coral, echo, marin, sage, shimmer, verse; the nine both reference clients list
    (including oh-my-pi's default sol) are rejected — they belong to the v1/GPT-Live realtime route.
  • Voice is immutable after session start (session.update returns
    immutable_field_update), so the allowlist has to be right at call creation.

Known transient: one live attempt reached 201 but timed out awaiting session.started;
an immediate rerun passed. The sideband join now retries with exponential backoff.

Follow-ups (not in this PR): iOS decodes only GA transcript events, so GPT-Live realtime
sessions connect but show no transcript — this also affects the existing Codex OAuth route
today. A gateway-side WebRTC peer would extend GPT-Live to Discord, telephony, and Android.
Surfacing an unexpected sideband drop to the browser needs a new async session-error seam.
Issue #114992 (the Codex runtime/fallback shared-state mismatch) is real and untouched
here; this route does not depend on it.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts extensions: openai extensions: codex labels Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 14:00
@steipete
steipete requested a review from a team as a code owner July 28, 2026 14:00
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Jul 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 12:16 PM ET / 16:16 UTC.

ClawSweeper review

What this changes

This PR adds GPT-Live browser Talk sessions through ChatGPT OAuth by having the Gateway broker WebRTC and a sideband connection, send model delegations through OpenClaw’s agent-consult runtime, and return the result as voice context.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 7 items remain

Keep this protected maintainer feature PR open for an explicit product/auth decision and stronger end-to-end proof. The branch has a coherent browser-only design and no discrete source-level correctness finding from this review, but the existing proof reaches WebRTC call creation and session.started, not the central user flow: a browser Talk delegation invoking OpenClaw and returning speakable context. The related member report at #115021 also documents a conflicting OAuth-support policy, so merge approval should be human-owned.

Priority: P2
Reviewed head: a6e2865464125546e265e6d41d566a9f5dcf5740
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation has substantial focused coverage and a coherent scope, but the central real behavior is still not demonstrated and the supported OAuth product contract remains unresolved.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The PR includes redacted live output for OAuth call creation and session.started, but it does not show the changed browser Talk delegation path invoking OpenClaw and returning speakable context; add redacted live logs, terminal output, or a recording of that complete path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR includes redacted live output for OAuth call creation and session.started, but it does not show the changed browser Talk delegation path invoking OpenClaw and returning speakable context; add redacted live logs, terminal output, or a recording of that complete path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Central behavior remains unproven: The PR body’s live evidence demonstrates OAuth call creation, answer SDP, sideband connection, and session.started, but not a delegation.created event flowing through the Gateway agent consult and returning speakable context. The prior completed ClawSweeper cycle made that exact proof request, and the current head only follows with lint/live-shard gate fixes. (github.com)
New plugin API surface: The branch adds an optional host-injected runAgentConsult callback to browser-session creation, changing the plugin SDK contract used by realtime providers. That is a compatibility-sensitive extension point even though it is additive.
Upstream Codex contract checked: Current Codex source still models Quicksilver as a separate session type and its realtime-call tests use the AVAS /v1/realtime/calls?intent=quicksilver&architecture=avas shape; this PR deliberately relies on a separately live-probed /v1/live route, so the live proof must establish the OpenClaw-specific route and delegation behavior rather than treating Codex as sufficient proof. (github.com)
Findings None None.
Security None None.

How this fits together

Browser Talk asks the Gateway to resolve a realtime voice provider and create a browser session. For GPT-Live, the OpenAI plugin keeps the upstream OAuth exchange and sideband server-side, while delegations run through the existing agent-consult runtime before results return to the live voice session.

flowchart LR
  A[Browser Talk session] --> B[Gateway Talk handler]
  B --> C[OpenAI realtime provider]
  C --> D[OpenAI GPT-Live WebRTC call]
  C --> E[Gateway-owned sideband]
  E --> F[Agent-consult runtime]
  F --> G[Speakable context append]
  G --> D
  D --> A
Loading

Decision needed

Question Recommendation
Should OpenClaw publicly support the live-probed GPT-Live ChatGPT OAuth browser route despite the related open report’s Platform-key-only OAuth policy conclusion? Sponsor browser-only GPT-Live OAuth: Accept the route as an experimental browser-WebRTC capability after a redacted browser delegation round-trip proof and owner review of the auth and origin boundaries.

Why: The branch introduces a user-facing provider/auth capability and a plugin SDK extension, while the related member report presents conflicting live-contract evidence; implementation correctness alone cannot select the supported product contract.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR includes redacted live output for OAuth call creation and session.started, but it does not show the changed browser Talk delegation path invoking OpenClaw and returning speakable context; add redacted live logs, terminal output, or a recording of that complete path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The additive realtime-provider callback becomes a public plugin SDK seam without a resolved maintainer decision on its long-term contract.
  • Resolve merge risk (P1) - GPT-Live selects ChatGPT OAuth ahead of Platform credentials for this model family; acceptance therefore changes an auth-provider routing promise that conflicts with the related open OAuth-support report.
  • Resolve merge risk (P1) - The new browser-facing route depends on the shared origin-acceptance boundary and handles OAuth-backed upstream calls, so its intended browser-origin and credential-custody model needs owner sign-off.
  • Resolve merge risk (P1) - A sideband-ready session does not prove that agent delegation succeeds or that a failure is visible to the Talk user; the PR itself notes that post-connect sideband failures lack a browser error seam.
  • Complete next step (P2) - A protected maintainer feature with an unresolved OAuth product contract and contributor-only live proof cannot be safely routed to an automated repair lane.
Agent review details

Security

None.

PR surface

Source +1734, Tests +1954, Docs +101, Config +1, Generated 0, Other +5. Total +3795 across 40 files.

View PR surface stats
Area Files Added Removed Net
Source 19 1836 102 +1734
Tests 13 1976 22 +1954
Docs 4 154 53 +101
Config 1 2 1 +1
Generated 1 1 1 0
Other 2 7 2 +5
Total 40 3976 181 +3795

Review metrics

Metric Value Why it matters
Realtime provider contract 1 optional callback added runAgentConsult expands the browser-session provider API and needs a durable compatibility decision.
Auth routing behavior 1 new model family prefers OAuth GPT-Live changes the selected credential source for an explicit Talk model without adding a new configuration key.

Stored data model

Persistent data-model change detected: serialized state: extensions/openai/realtime-quicksilver-delegation.test.ts, serialized state: extensions/openai/realtime-voice-provider.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Add a complete live delegation proof (recommended)
    Before merge, capture redacted browser Talk evidence showing a GPT-Live delegation, the Gateway agent-consult result, and its returned speakable context.
  2. Explicitly sponsor the OAuth contract
    A responsible owner may accept the early OAuth-route risk after confirming that browser-only GPT-Live is the intended supported policy despite the related report.
  3. Pause for route-policy resolution
    Pause this PR if maintainers cannot yet commit to the undocumented OAuth route or the new provider-delegation SDK seam.

Technical review

Best possible solution:

Keep the OpenAI-plugin-owned broker design only if an owner explicitly sponsors GPT-Live ChatGPT OAuth support; before merge, add redacted proof of a real browser Talk request causing one agent delegation and a returned speakable response, while preserving the GA realtime and non-WebRTC fail-closed paths.

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

Unclear for the complete user flow: source and the PR body establish a GPT-Live offer and sideband path, but there is no current evidence of browser Talk triggering an agent delegation and receiving its speakable result.

Is this the best way to solve the issue?

Unclear: the Gateway-owned sideband is the right ownership shape for keeping upstream credentials out of the browser, but maintainers must first choose whether this OAuth route and the new provider callback are the supported contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3506f36555cc.

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The browser-only Gateway sideband design could unlock full-duplex voice interactions while keeping upstream credentials out of the Control UI, which is an unusually meaningful workflow capability if the OAuth route is approved.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded but user-visible realtime-provider capability with unresolved policy and proof requirements.
  • merge-risk: 🚨 compatibility: The PR adds a public plugin SDK callback and a new browser-session capability contract for providers.
  • merge-risk: 🚨 auth-provider: GPT-Live explicitly prioritizes ChatGPT OAuth over Platform credentials and conflicts with an open auth-routing report.
  • merge-risk: 🚨 security-boundary: The Gateway becomes the custodian of an OAuth-backed browser offer and sideband while plugin routes reuse the canonical origin decision.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. The browser-only Gateway sideband design could unlock full-duplex voice interactions while keeping upstream credentials out of the Control UI, which is an unusually meaningful workflow capability if the OAuth route is approved.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes redacted live output for OAuth call creation and session.started, but it does not show the changed browser Talk delegation path invoking OpenClaw and returning speakable context; add redacted live logs, terminal output, or a recording of that complete path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Central behavior remains unproven: The PR body’s live evidence demonstrates OAuth call creation, answer SDP, sideband connection, and session.started, but not a delegation.created event flowing through the Gateway agent consult and returning speakable context. The prior completed ClawSweeper cycle made that exact proof request, and the current head only follows with lint/live-shard gate fixes. (github.com) (extensions/openai/realtime-quicksilver.live.test.ts:19, a6e286546412)
  • New plugin API surface: The branch adds an optional host-injected runAgentConsult callback to browser-session creation, changing the plugin SDK contract used by realtime providers. That is a compatibility-sensitive extension point even though it is additive. (src/talk/provider-types.ts:128, a6e286546412)
  • Upstream Codex contract checked: Current Codex source still models Quicksilver as a separate session type and its realtime-call tests use the AVAS /v1/realtime/calls?intent=quicksilver&architecture=avas shape; this PR deliberately relies on a separately live-probed /v1/live route, so the live proof must establish the OpenClaw-specific route and delegation behavior rather than treating Codex as sufficient proof. (github.com)
  • Related auth-policy conflict: OpenAI realtime Talk advertises an unsupported Codex OAuth fallback #115021 is an open member-authored report that recommends Platform-key-only browser realtime after finding the existing Codex OAuth fallback unsupported. This PR claims a different GPT-Live OAuth route works, making acceptance a product and auth-contract decision rather than routine implementation review. (extensions/openai/realtime-voice-provider.ts:279, a6e286546412)
  • Dependency scope: The dependency diff adds the already repository-pinned zod version as an OpenAI-plugin runtime dependency; the provided dependency guard and dependency checks report no failed dependency-policy check. (extensions/openai/package.json:5, a6e286546412)

Likely related people:

  • steipete: Authored the GPT-Live broker, the provider delegation seam, and the shared browser-origin migration in the supplied branch history; the dependency-graph guard also identifies this actor as trusted for the dependency change. (role: current feature owner; confidence: medium; commits: dce01cb3a6e2, c69ab49230d6, ce2c5f3e78e6; files: extensions/openai/realtime-quicksilver-session.ts, extensions/openai/realtime-voice-provider.ts, src/gateway/server-methods/talk-client.ts)
  • vincentkoc: Authored the open member report describing the current Codex OAuth realtime support contract and its unsupported-fallback evidence; that report directly conflicts with the route promised by this PR. (role: adjacent auth-contract reporter; confidence: low; files: extensions/openai/realtime-voice-provider.ts, extensions/codex/src/realtime-browser-session.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post redacted real browser Talk proof of delegation creation, agent-consult execution, and speakable-context return.
  • Obtain owner confirmation that GPT-Live ChatGPT OAuth is an intended supported browser-only route.
  • Explain the permanent compatibility expectations for the new provider runAgentConsult callback.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-07-28T15:26:49.874Z sha 89094c3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-28T15:45:53.034Z sha dade398 :: needs real behavior proof before merge. :: none

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/openai/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: a1b5565f8c64a931f76b4f947474162d4bb5ff02
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@steipete
steipete force-pushed the steipete/realtime-gpt-live-1-1d214b branch from dade398 to a6e2865 Compare July 28, 2026 16:12
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 28, 2026
@steipete
steipete force-pushed the steipete/realtime-gpt-live-1-1d214b branch from a6e2865 to 185f3b7 Compare July 28, 2026 18:03
steipete added 4 commits July 28, 2026 11:22
Export resolveAcceptedBrowserOrigin through openclaw/plugin-sdk/webhook-request-guards
so browser-facing plugin routes reuse the Gateway's real origin contract instead of a
narrow allowedOrigins array check. Private LAN/Tailnet Control UI loads and the
Host-header fallback were previously rejected with 403 by plugin offer routes while the
Control UI itself worked.

Moves the loopback/forwarded-header helpers to net.ts (re-exported from auth.ts) so the
guard can delegate without importing gateway auth, and migrates the Codex realtime
broker onto the shared seam.
Adds an optional runAgentConsult callback to the browser-session create request and
injects the existing embedded consult runtime from talk-client, bound to the same agent
and session key the GA tool path uses. Providers whose realtime protocol delegates work
through their own control channel (rather than GA function calls) can now reach the
OpenClaw agent without a client round-trip.

Threads the effective per-session model into browser-session capability resolution so a
request-level model override selects the right capability set, and propagates a caller
abort signal into consultRealtimeVoiceAgent so a superseded delegation stops its run.
Implements OpenAI's quicksilver/frameless session natively for Talk browser sessions.
The Gateway creates the WebRTC call (multipart sdp+session to https://api.openai.com/v1/live)
and owns the sideband control socket, so the browser never holds upstream credentials;
delegation.created events run through the OpenClaw agent and stream back as speakable
context appends.

Verified end-to-end on 2026-07-28 against a ChatGPT Pro OAuth profile: call create 201
with an rtc_* id and answer SDP, sideband session.started, session.close teardown.
ChatGPT OAuth is preferred over a Platform API key because /v1/live access for platform
keys is waitlist-gated; the legacy chatgpt.com backend route returns 403 for every model
and protocol version and is not used.

Accepted models are gpt-live-1-codex and gpt-live-1-boulder-alpha; the voice allowlist is
the ten values the route actually accepts, since an invalid voice is rejected at call
creation and cannot be repaired afterwards (session.update reports immutable_field_update).
Records the working route and auth, the accepted models and voices, the browser-only
scope, and the two traps that cost the most time: the chatgpt.com backend route returns
403 Voice session access denied for every model, and that same 403 is also what an
invalid voice returns, so it must not be read as an account entitlement block.
steipete added 9 commits July 28, 2026 11:22
Types the retry-delay finish callback as Error so the rejection reason is provably an
Error at the call site; the abort path already normalized a non-Error AbortSignal reason,
but the unknown parameter type hid that from static analysis.

Registers the new GPT-Live live test in the native-live-extensions-openai shard
expectation. The shard selector already picked the file up from the real tree; only the
hardcoded list in the tooling test lagged.
@steipete
steipete force-pushed the steipete/realtime-gpt-live-1-1d214b branch from 9f39337 to c9dcb82 Compare July 28, 2026 18:22
@steipete

steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready summary

Landing at a1b5565f8c64a931f76b4f947474162d4bb5ff02. Addressing the three rank-up moves from the ClawSweeper review, plus the auth-policy conflict it flagged.

Owner confirmation on the route (rank-up move 2)

Confirmed as intended. GPT-Live over ChatGPT OAuth is a deliberate, browser-only, opt-in route: it activates only when talk.realtime.model is explicitly set to a GPT-Live value, and isBrowserSessionConfigured returns false for it without an OAuth profile, so talk.catalog and auto-select can never pick it on their own. GA realtime behavior and its auth precedence are untouched.

Relationship to #115021 / #115211 (auth-policy conflict)

There is no contradiction — the two reports are about different endpoints, which is exactly what cost the most investigation time here.

https://chatgpt.com/backend-api/codex/realtime/calls returns 403 Voice session access denied for every model and both protocol versions. That is the route the removed Codex-brokered fallback used, and @vincentkoc's finding on it is correct; #115211 was right to delete it.

https://api.openai.com/v1/live with the same ChatGPT OAuth context returns 201 Created with a Location: /v1/live/rtc_... and an answer SDP, and the sideband at wss://api.openai.com/v1/live/<call_id> then reports session.started. Verified live with GPT-Live. This PR adds only that second route, and does not restore the first.

Two traps worth recording for anyone who retreads this, both documented in docs/providers/openai.md:

  • That 403 is overloaded. It is also what an invalid voice returns, so it must not be mapped to "account not entitled" alone. The accepted voice set is alloy, ash, ballad, cedar, coral, echo, marin, sage, shimmer, verse; the other nine that appear in some reference clients are rejected, and voice is immutable after session start (immutable_field_update), so it cannot be repaired mid-call.
  • Platform API keys are still waitlist-gated on /v1/live and return 400 model_not_found. That is mapped to a waitlist-specific message rather than a generic failure.

Compatibility expectations for runAgentConsult (rank-up move 3)

runAgentConsult is an additive optional field on RealtimeVoiceBrowserSessionCreateRequest, which is published through openclaw/plugin-sdk/realtime-voice. It is therefore public plugin-SDK surface and covered by the usual deprecation path — removing or narrowing it later would need a new API plus a named compat window, not a silent change.

It is host-injected, not plugin-provided: the Gateway supplies it and a provider consumes it only if its own protocol delegates through a control channel it owns. Providers that do not declare handlesAgentConsult never observe it, so existing provider plugins are unaffected by its presence. The value reuses consultRealtimeVoiceAgent with the same agent id and session key as the GA tool path, so delegation and GA tool-calls share one execution path rather than forking agent dispatch.

Proof

Live, against a real ChatGPT Pro OAuth profile — opt-in E2E (OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_GPT_LIVE=1) that builds a genuine Chromium WebRTC offer, calls our own multipart helper, applies the answer, joins our own sideband, and asserts session.started. It skips cleanly with no OAuth profile and never prints tokens.

Focused GPT-Live suites were green locally at head across wire, session, delegation, provider, gateway-origin, provider-resolution, and live-shard coverage.

Hosted CI is green on this exact head (run 30388058296). checks-node-compact-large-2 failed twice with a 120s timeout in src/gateway/server-startup-log.test.ts and a fake-timer boundary assertion in src/gateway/server-startup-post-attach.test.ts. Neither file nor anything they exercise is touched by this PR. To rule that out rather than assume it, the entire agentic-control-plane-startup-core shard was run locally at head — 14 files, 146 tests, green in 51s, against 525s for the same shard in CI. That 10x wall-clock gap is runner contention; the job passed on rerun.

Known proof gaps (rank-up move 1)

A full spoken round trip through a real browser Talk session — delegation.created, agent-consult execution, speakable context returned and read aloud — is not yet posted. What is proven live is call creation and sideband join against the real endpoint; the delegation handling itself is covered by unit tests against a fake sideband, not by a recorded voice session. I am running that live session next and will attach redacted proof; flagging it here rather than implying coverage this PR does not have.

Also still open, deliberately, and each stop-reported rather than worked around:

  • iOS decodes only GA transcript events, so GPT-Live realtime sessions connect without a visible transcript. Separate follow-up; it also affected the route removed by fix(talk): stop offering unsupported Codex OAuth realtime #115211.
  • Telephony, gateway-relay, and Android remain unsupported for gpt-live because GPT-Live is WebRTC-only. A gateway-side WebRTC peer would close that gap.
  • An unexpected sideband drop is not surfaced to the browser as a session error. That needs a new async session-error seam.

Follow-up worth its own PR

GA realtime also works over ChatGPT OAuth — POST /v1/realtime/calls?model=<m> with a raw application/sdp body and the OAuth bearer returns 201 for gpt-realtime-2.1, gpt-realtime-2.1-mini, and gpt-realtime-2, verified during this work. Reusing this offer-broker pattern there would give every ChatGPT Plus/Pro user Talk realtime without a Platform key. Note the shape differs from GPT-Live: raw SDP plus a ?model= query, not multipart.

@steipete
steipete merged commit f78ba09 into main Jul 28, 2026
192 of 194 checks passed
@steipete
steipete deleted the steipete/realtime-gpt-live-1-1d214b branch July 28, 2026 19:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* origin/main: (61 commits)
  perf(ui): debounce event-driven session list refreshes and right-size child paging (openclaw#115374)
  feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (openclaw#115226)
  feat(system-agent): guide gateway configuration in Ask OpenClaw (openclaw#115363)
  fix(agents): make overflow recovery append-only via branch-and-reappend (openclaw#115271) (openclaw#115310)
  fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (openclaw#115362)
  fix(codex): isolate native hook relay startup (openclaw#115078)
  fix(ci): stop reviving superseded pull request workflows (openclaw#115378)
  feat(openshell): add workspace selection (openclaw#114952)
  fix(skills): persist workshop apply reason; correct Skill Workshop docs (openclaw#114471)
  fix: agent stops replying when a session transcript has no header row (openclaw#115080)
  perf(usage): stale-while-revalidate caches for usage.status and sessions.usage (openclaw#115369)
  fix(discord): reject invalid UTF-8 probe responses (openclaw#111734)
  feat(gateway): add memory.search operator method (openclaw#115346)
  fix(android): keep welcome action reachable with large text (openclaw#111747)
  fix(gateway): validate doctor memory agent ids (openclaw#115365)
  refactor: harden shell completion and shard Control UI E2E (openclaw#115332)
  fix(ui): anchor the thread branches menu to its trigger button (openclaw#115352)
  perf(sessions): incremental snapshot revalidation and shallow list projections (openclaw#115359)
  refactor(sessions): consolidate entry state (openclaw#115299)
  feat(ui): swap three plain Lobsterdex palettes for balloon, ascii, and portal (openclaw#115308)
  ...
vincentkoc added a commit that referenced this pull request Jul 28, 2026
…etwork-none

* origin/main: (74 commits)
  fix(ui): make Control UI ownership and permissions reliable (#115364)
  feat(system-agent): host memory import in Ask OpenClaw (#115376)
  fix(chat): preserve literal Markdown image examples (#113904)
  refactor(chat): keep web and terminal sessions synchronized (#115377)
  fix(ui): order model picker by provider strength (#115380)
  feat(ui): make Memory settings a destination page with live overview and dreams (#115383)
  docs(security): fix warning line wrap (#115388)
  fix(memory-core): avoid cubic MMR similarity rescans (#113359)
  fix(discord): preserve code-leading reasoning chunks (#103166)
  fix(slack): protect outbound hooks from previews
  fix(ui): keep explicit navigation ahead of chat canonicalization (#115366)
  fix(exec): safely cancel pending node approvals (#115373)
  fix: make Code Mode reliable across gateway and provider lifecycles (#115379)
  perf(ui): debounce event-driven session list refreshes and right-size child paging (#115374)
  feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (#115226)
  feat(system-agent): guide gateway configuration in Ask OpenClaw (#115363)
  fix(agents): make overflow recovery append-only via branch-and-reappend (#115271) (#115310)
  fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (#115362)
  fix(codex): isolate native hook relay startup (#115078)
  fix(ci): stop reviving superseded pull request workflows (#115378)
  ...

# Conflicts:
#	CHANGELOG.md
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…law#115226)

* feat(gateway): share the canonical browser-origin policy with plugins

Export resolveAcceptedBrowserOrigin through openclaw/plugin-sdk/webhook-request-guards
so browser-facing plugin routes reuse the Gateway's real origin contract instead of a
narrow allowedOrigins array check. Private LAN/Tailnet Control UI loads and the
Host-header fallback were previously rejected with 403 by plugin offer routes while the
Control UI itself worked.

Moves the loopback/forwarded-header helpers to net.ts (re-exported from auth.ts) so the
guard can delegate without importing gateway auth, and migrates the Codex realtime
broker onto the shared seam.

* feat(talk): let providers own agent delegation for realtime voice

Adds an optional runAgentConsult callback to the browser-session create request and
injects the existing embedded consult runtime from talk-client, bound to the same agent
and session key the GA tool path uses. Providers whose realtime protocol delegates work
through their own control channel (rather than GA function calls) can now reach the
OpenClaw agent without a client round-trip.

Threads the effective per-session model into browser-session capability resolution so a
request-level model override selects the right capability set, and propagates a caller
abort signal into consultRealtimeVoiceAgent so a superseded delegation stops its run.

* feat(openai): support GPT-Live realtime voice over ChatGPT OAuth

Implements OpenAI's quicksilver/frameless session natively for Talk browser sessions.
The Gateway creates the WebRTC call (multipart sdp+session to https://api.openai.com/v1/live)
and owns the sideband control socket, so the browser never holds upstream credentials;
delegation.created events run through the OpenClaw agent and stream back as speakable
context appends.

Verified end-to-end on 2026-07-28 against a ChatGPT Pro OAuth profile: call create 201
with an rtc_* id and answer SDP, sideband session.started, session.close teardown.
ChatGPT OAuth is preferred over a Platform API key because /v1/live access for platform
keys is waitlist-gated; the legacy chatgpt.com backend route returns 403 for every model
and protocol version and is not used.

Accepted models are gpt-live-1-codex and gpt-live-1-boulder-alpha; the voice allowlist is
the ten values the route actually accepts, since an invalid voice is rejected at call
creation and cannot be repaired afterwards (session.update reports immutable_field_update).

* docs: document GPT-Live Talk support and its route gotchas

Records the working route and auth, the accepted models and voices, the browser-only
scope, and the two traps that cost the most time: the chatgpt.com backend route returns
403 Voice session access denied for every model, and that same 403 is also what an
invalid voice returns, so it must not be read as an account entitlement block.

* fix(openai): resolve GPT-Live CI failures

* refactor(openai): own zod runtime dependency

* fix(openai): satisfy lint and live-shard gates for GPT-Live

Types the retry-delay finish callback as Error so the rejection reason is provably an
Error at the call site; the abort path already normalized a non-Error AbortSignal reason,
but the unknown parameter type hid that from static analysis.

Registers the new GPT-Live live test in the native-live-extensions-openai shard
expectation. The shard selector already picked the file up from the real tree; only the
hardcoded list in the tooling test lagged.

* fix(openai): clean up post-rebase capability resolver

* fix(openai): preserve GPT-Live delegation fragments

* fix(openai): close GPT-Live sideband handoff race

* fix(openai): accept UUID GPT-Live call ids

* style: apply oxfmt to GPT-Live sources and Talk docs

* style: format Talk docs after rebase

* fix(openai): keep GPT-Live transcript context across ignored delegations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: openai feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support OpenAI GPT-Live full-duplex realtime voice

1 participant