Repository navigation
feat(talk): support GPT-Live realtime voice over ChatGPT OAuth - #115226
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 28, 2026, 12:16 PM ET / 16:16 UTC. ClawSweeper reviewWhat this changesThis 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 Priority: P2 Review scores
Verification
How this fits togetherBrowser 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
Decision needed
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
Agent review detailsSecurityNone. PR surfaceSource +1734, Tests +1954, Docs +101, Config +1, Generated 0, Other +5. Total +3795 across 40 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
dade398 to
a6e2865
Compare
a6e2865 to
185f3b7
Compare
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.
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.
9f39337 to
c9dcb82
Compare
Land-ready summaryLanding at 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 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.
Two traps worth recording for anyone who retreads this, both documented in
Compatibility expectations for
|
|
Merged via squash.
|
* 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) ...
…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
…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
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.modelto aGPT-Livevalue failed closed with "GPT-Live models are notsupported for Talk browser sessions yet", so the only realtime option was the GA
gpt-realtime-2.1family.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
runAgentConsultcallback, so a provider whose protocol delegates through its own controlchannel 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.allowedOriginsand would 403 private LAN/Tailnet Control UI sessionsthat 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-Liveis 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 theweb 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/liveaccess for platform keys iswaitlist-gated and returns
model_not_found— so GPT-Live selects the ChatGPT OAuthprofile 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.startedbefore closing. It skips cleanly with no OAuth profile.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/codexcodex-rsat899539c03aandcross-checked against the independent MIT client
can1357/oh-my-pi, then verified by liveprobing. Three findings from probing overruled both reference clients and are worth
knowing:
chatgpt.com/backend-api/codex/realtime/callsroute returns403 Voice session access deniedfor every model and both protocol versions.api.openai.com/v1/livewiththe OAuth bearer plus
chatgpt-account-idis the route that works. Upstream codex picksits endpoint from the auth mode's base URL, so it lands on the failing route with ChatGPT
auth — its own client reproduces the 403.
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.session.updatereturnsimmutable_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/fallbackshared-state mismatch) is real and untouchedhere; this route does not depend on it.