Skip to content

Commit cfddfc2

Browse files
authored
fix: restore GPT-Live subscription calls and model-specific voices (#133079)
* fix: restore GPT-Live subscription calls and model-specific voices * fix: describe GPT-Live Gateway relay in Talk setup * fix: type Talk catalog fixtures and simplify voice validation * test: identify the provider in the quota ownership fixture
1 parent 1ab7b75 commit cfddfc2

24 files changed

Lines changed: 310 additions & 178 deletions

‎config/assertion-safety-baseline.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ extensions/openai/realtime-provider-shared.ts 2
923923
extensions/openai/realtime-quicksilver-bridge.ts 1
924924
extensions/openai/realtime-quicksilver-delegation-controller.ts 1
925925
extensions/openai/realtime-quicksilver-gateway-bridge.ts 1
926-
extensions/openai/realtime-quicksilver-wire.ts 6
926+
extensions/openai/realtime-quicksilver-wire.ts 4
927927
extensions/openai/realtime-quicksilver.ts 1
928928
extensions/openai/realtime-voice-bridge.ts 3
929929
extensions/openai/realtime-voice-provider.ts 1

‎docs/nodes/talk.md‎

Lines changed: 35 additions & 32 deletions
Large diffs are not rendered by default.

‎docs/providers/openai.md‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ explicit runtime config.
169169
<Note>
170170
GA OpenAI Realtime backend voice bridges require a Platform API key. GA browser
171171
Talk can also use an OpenClaw ChatGPT OAuth profile when no Platform credential
172-
is configured. Browser and Gateway-relay GPT-Live use the native
173-
`api.openai.com/v1/live` route, which prefers a ChatGPT
174-
OAuth profile and falls back to Platform API-key auth when that account has
175-
waitlist-gated access. Other GPT-Live backend voice bridges use the Frameless
172+
is configured. Browser and Gateway-relay GPT-Live prefer a ChatGPT OAuth
173+
profile and create calls through the Codex backend. With Platform API-key auth,
174+
they use `api.openai.com/v1/live`, which requires API access. Other GPT-Live backend voice bridges use the Frameless
176175
Bidi WebSocket and require Platform API-key auth.
177176

178177
Platform auth is resolved in this order: configured realtime API key, `openai`
@@ -1039,9 +1038,11 @@ value into `plugins.entries.openai.config.personality` when that key is unset.
10391038
#### GPT-Live transport paths
10401039

10411040
GPT-Live is supported for browser Talk and Gateway-owned `gateway-relay`
1042-
Talk using ChatGPT OAuth or an enrolled Platform API key. Both paths create
1043-
a WebRTC call at `/v1/live`; the Gateway relay uses a `werift` peer and keeps
1044-
media, credentials, and the authenticated sideband on the Gateway. Discord
1041+
Talk using ChatGPT OAuth or an enrolled Platform API key. ChatGPT OAuth
1042+
creates the call through the Codex backend using JSON `sdp` and `session`;
1043+
Platform API keys use multipart call creation at `/v1/live`. Both attach
1044+
the Gateway-owned sideband at `wss://api.openai.com/v1/live/<call-id>`.
1045+
The Gateway relay keeps media, credentials, and sideband control on the Gateway. Discord
10451046
and Voice Call use the Frameless Bidi
10461047
`wss://api.openai.com/v1/live?model=...` endpoint with Platform API-key auth.
10471048

@@ -1050,9 +1051,13 @@ value into `plugins.entries.openai.config.personality` when that key is unset.
10501051
`gpt-live-1-mini` are not valid on this route. Opt in explicitly with
10511052
`talk.realtime.model`; `gpt-realtime-2.1` remains the GA default.
10521053

1053-
GPT-Live accepts these voices: `alloy`, `ash`, `ballad`, `cedar`, `coral`,
1054-
`echo`, `marin`, `sage`, `shimmer`, and `verse`. OpenClaw defaults to
1055-
`marin` and maps unknown or unsupported configured voices back to it.
1054+
GPT-Live follows the Codex V3 voice contract: `arbor`, `breeze`, `cove`,
1055+
`ember`, `juniper`, `maple`, `sol`, `spruce`, and `vale`. OpenClaw defaults
1056+
to `cove` and maps unsupported configured voices back to it. These are
1057+
separate from GA Realtime voices; `marin` and `cedar` are GA choices.
1058+
Current speech-roundtrip verification covers ChatGPT OAuth with `spruce`;
1059+
Platform GPT-Live uses the same Codex V3 voice contract, but its live
1060+
verification requires an account with API access.
10561061

10571062
Browser WebRTC prerequisites, in order:
10581063

@@ -1066,10 +1071,9 @@ value into `plugins.entries.openai.config.personality` when that key is unset.
10661071
`plugins.allow` list fails with "OpenAI GPT-Live browser session broker
10671072
is unavailable".
10681073

1069-
Note one asymmetric failure mode: a configured Platform API key that
1070-
cannot be resolved (for example a broken secret reference) suppresses the
1071-
OAuth fallback with "fix or remove it" — repair or delete the key rather
1072-
than expecting OAuth to take over silently.
1074+
GPT-Live prefers the ChatGPT OAuth profile even when a Platform key is
1075+
configured. If no OAuth profile is available, an unresolved configured
1076+
Platform key must be repaired or removed before another credential can be used.
10731077

10741078
```json5
10751079
{

‎docs/web/control-ui.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ Chat error banners, including cloud runner failures, keep a compact preview. Ope
622622

623623
</Accordion>
624624
<Accordion title="Talk mode (browser realtime)">
625-
Talk mode uses a registered realtime voice provider. Configure OpenAI with `talk.realtime.provider: "openai"`. GA `gpt-realtime-*` browser WebRTC uses Platform auth in this order: `talk.realtime.providers.openai.apiKey`, an `openai` API-key profile, then `OPENAI_API_KEY`. Native GPT-Live browser WebRTC uses `api.openai.com/v1/live` through the Gateway offer broker and prefers a ChatGPT OAuth subscription profile over Platform auth. GPT-Live also supports Gateway relay through a direct Frameless Bidi WebSocket with Platform API-key auth and no browser or WebRTC provider connection; Platform `/v1/live` access remains waitlist-gated. Configure Google with `talk.realtime.provider: "google"` plus `talk.realtime.providers.google.apiKey`. The browser never receives a standard provider API key or a ChatGPT OAuth token: Platform GA OpenAI receives an ephemeral Realtime client secret, native GPT-Live WebRTC receives a one-use Gateway reservation, and Google Live receives a one-use constrained Live API auth token for a browser WebSocket session. Gateway relay keeps provider credentials and vendor sockets server-side while browser audio moves through authenticated Gateway RPCs. Platform GA sessions use the Gateway's direct-tool prompt, while GPT-Live uses provider delegations. `talk.client.create` does not accept caller-provided instruction overrides.
625+
Talk mode uses a registered realtime voice provider. Configure OpenAI with `talk.realtime.provider: "openai"`. GA `gpt-realtime-*` browser WebRTC uses Platform auth in this order: `talk.realtime.providers.openai.apiKey`, an `openai` API-key profile, then `OPENAI_API_KEY`. Native GPT-Live browser WebRTC and Gateway relay prefer a ChatGPT OAuth subscription profile and create calls through the Codex backend offer route; Platform API-key calls use `api.openai.com/v1/live` and require access to that API. Both keep the authenticated GPT-Live sideband on the Gateway. Gateway relay also keeps the WebRTC media peer server-side. GPT-Live has its own voice choices, shown by the model-aware Talk picker; GA Realtime voices do not apply. See [Talk mode](/nodes/talk) for setup and transport details. Configure Google with `talk.realtime.provider: "google"` plus `talk.realtime.providers.google.apiKey`. The browser never receives a standard provider API key or a ChatGPT OAuth token: Platform GA OpenAI receives an ephemeral Realtime client secret, native GPT-Live WebRTC receives a one-use Gateway reservation, and Google Live receives a one-use constrained Live API auth token for a browser WebSocket session. Gateway relay keeps provider credentials and vendor sockets server-side while browser audio moves through authenticated Gateway RPCs. Platform GA sessions use the Gateway's direct-tool prompt, while GPT-Live uses provider delegations. `talk.client.create` does not accept caller-provided instruction overrides.
626626

627627
Persistent provider, model, voice, transport, reasoning effort, exact VAD threshold, silence duration, and prefix padding defaults live in **Settings → Communications → Talk**; changing them requires `operator.admin` access. Configuring Gateway relay forces the backend relay path; configuring WebRTC keeps the session client-owned and fails instead of silently falling back to relay if the provider cannot create a browser session.
628628

‎extensions/openai/realtime-quicksilver-bridge.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function createHarness(params?: {
8989
const bridge = new OpenAIQuicksilverVoiceBridge({
9090
providerConfig: {},
9191
model: "gpt-live-1-codex",
92-
voice: "marin",
92+
voice: "spruce",
9393
instructions: "Use delegation for real work.",
9494
audioFormat:
9595
params?.audioFormat === "g711_ulaw"
@@ -141,7 +141,7 @@ describe("OpenAIQuicksilverVoiceBridge", () => {
141141
type: "session.update",
142142
session: {
143143
instructions: "Use delegation for real work.",
144-
audio: { output: { voice: "marin" } },
144+
audio: { output: { voice: "spruce" } },
145145
delegation: { type: "client" },
146146
},
147147
});

‎extensions/openai/realtime-quicksilver-gateway-bridge.live.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describeLive("OpenAI GPT-Live gateway WebRTC peer", () => {
8888
const bridge = new OpenAIQuicksilverGatewayBridge({
8989
providerConfig: {},
9090
model: "gpt-live-1-codex",
91-
voice: "marin",
91+
voice: "spruce",
9292
instructions:
9393
"This is a live transport check. Immediately say: OpenClaw gateway relay test OK.",
9494
audioFormat: { encoding: "pcm16", sampleRateHz: 24_000, channels: 1 },
@@ -164,7 +164,7 @@ describeLive("OpenAI GPT-Live gateway WebRTC peer", () => {
164164
const bridge = new OpenAIQuicksilverGatewayBridge({
165165
providerConfig: {},
166166
model: "gpt-live-1-boulder-alpha",
167-
voice: "marin",
167+
voice: "spruce",
168168
instructions: "Listen to the user. Do not speak or delegate.",
169169
audioFormat: { encoding: "pcm16", sampleRateHz: 24_000, channels: 1 },
170170
onAudio: (audio) => {

‎extensions/openai/realtime-quicksilver-session.test.ts‎

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("GPT-Live session shaping", () => {
3636
buildOpenAIQuicksilverSession({
3737
model: "gpt-live-1",
3838
instructions: " Speak briefly. ",
39-
voice: "CEDAR",
39+
voice: "SPRUCE",
4040
initialItems: [
4141
{ role: "user", text: "Question" },
4242
{ role: "assistant", text: "Answer" },
@@ -45,7 +45,7 @@ describe("GPT-Live session shaping", () => {
4545
).toEqual({
4646
model: "gpt-live-1",
4747
instructions: "Speak briefly.",
48-
audio: { output: { voice: "cedar" } },
48+
audio: { output: { voice: "spruce" } },
4949
delegation: { type: "client" },
5050
initial_items: [
5151
{
@@ -69,11 +69,20 @@ describe("GPT-Live session shaping", () => {
6969
).toEqual({
7070
model: "gpt-live-1-mini",
7171
instructions: "",
72-
audio: { output: { voice: "marin" } },
72+
audio: { output: { voice: "cove" } },
7373
delegation: { type: "client" },
7474
});
7575
});
7676

77+
it.each(["arbor", "breeze", "cove", "ember", "juniper", "maple", "sol", "spruce", "vale"])(
78+
"accepts the Codex V3 %s voice",
79+
(voice) => {
80+
expect(buildOpenAIQuicksilverSession({ model: "gpt-live-1-codex", voice }).audio).toEqual({
81+
output: { voice },
82+
});
83+
},
84+
);
85+
7786
it.each([
7887
"alloy",
7988
"ash",
@@ -85,21 +94,12 @@ describe("GPT-Live session shaping", () => {
8594
"sage",
8695
"shimmer",
8796
"verse",
88-
])("accepts the live-proven %s voice", (voice) => {
97+
])("defaults the GA-only %s voice to Cove for GPT-Live", (voice) => {
8998
expect(buildOpenAIQuicksilverSession({ model: "gpt-live-1-codex", voice }).audio).toEqual({
90-
output: { voice },
99+
output: { voice: "cove" },
91100
});
92101
});
93102

94-
it.each(["arbor", "breeze", "cove", "ember", "juniper", "maple", "sol", "spruce", "vale"])(
95-
"falls back from the rejected %s voice",
96-
(voice) => {
97-
expect(buildOpenAIQuicksilverSession({ model: "gpt-live-1-codex", voice }).audio).toEqual({
98-
output: { voice: "marin" },
99-
});
100-
},
101-
);
102-
103103
it("bounds initial items to the newest context", () => {
104104
const session = buildOpenAIQuicksilverSession({
105105
model: "gpt-live-1-codex",
@@ -373,12 +373,17 @@ describe("GPT-Live offer broker", () => {
373373
auth: { type: "oauth" as const, token: "oauth-token", accountId: "account-123" },
374374
authorization: "Bearer oauth-token",
375375
accountId: "account-123",
376+
callUrl:
377+
"https://chatgpt.com/backend-api/codex/realtime/calls?intent=quicksilver&architecture=avas",
378+
contentType: "application/json",
376379
},
377380
{
378381
name: "API key",
379382
auth: { type: "api-key" as const, token: "platform-key" },
380383
authorization: "Bearer platform-key",
381384
accountId: undefined,
385+
callUrl: "https://api.openai.com/v1/live",
386+
contentType: expect.stringMatching(/^multipart\/form-data; boundary=/),
382387
},
383388
])("uses matching $name headers on signaling and the API sideband", async (authCase) => {
384389
vi.stubEnv("OPENCLAW_VERSION", "2026.7.2-test");
@@ -408,8 +413,7 @@ describe("GPT-Live offer broker", () => {
408413
);
409414

410415
const sideband = socketRequests[0];
411-
expect(signalingUrl).toBe("https://api.openai.com/v1/live");
412-
expect(signalingUrl).not.toContain("?");
416+
expect(signalingUrl).toBe(authCase.callUrl);
413417
expect(sideband?.url).toBe("wss://api.openai.com/v1/live/rtc_header-parity");
414418
expect(signalingHeaders).toMatchObject({
415419
Authorization: authCase.authorization,
@@ -420,7 +424,7 @@ describe("GPT-Live offer broker", () => {
420424
"session-id": expect.any(String),
421425
"thread-id": expect.any(String),
422426
"x-session-id": expect.any(String),
423-
"Content-Type": expect.stringMatching(/^multipart\/form-data; boundary=/),
427+
"Content-Type": authCase.contentType,
424428
});
425429
expect(sideband?.headers).toMatchObject({
426430
Authorization: authCase.authorization,
@@ -746,7 +750,7 @@ describe("GPT-Live offer broker", () => {
746750
expect(reservation).toMatchObject({
747751
offerUrl: OPENAI_QUICKSILVER_OFFER_PATH,
748752
model: "gpt-live-1",
749-
voice: "marin",
753+
voice: "cove",
750754
expiresAt: expect.any(Number),
751755
});
752756
if (reservation.transport !== "webrtc") {

‎extensions/openai/realtime-quicksilver-session.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ import {
3333
buildOpenAIQuicksilverSession,
3434
createOpenAIQuicksilverCall,
3535
hangupOpenAIRealtimeCall,
36-
resolveOpenAIQuicksilverVoice,
3736
type OpenAIQuicksilverAuth,
3837
type OpenAIQuicksilverInitialItem,
3938
type OpenAIQuicksilverRequestIds,
4039
} from "./realtime-quicksilver-wire.js";
41-
import { isOpenAIGptLiveModel } from "./realtime-quicksilver.js";
40+
import { isOpenAIGptLiveModel, resolveOpenAIQuicksilverVoice } from "./realtime-quicksilver.js";
4241
import { assertOpenAIRealtimeAudioOnlyOffer } from "./realtime-sdp-offer.js";
4342
export const OPENAI_QUICKSILVER_OFFER_PATH = "/plugins/openai/realtime/calls";
4443
export const OPENAI_QUICKSILVER_CAPABILITIES = {
@@ -70,7 +69,6 @@ type OpenAIQuicksilverSessionRequest = RealtimeVoiceBrowserSessionCreateRequest
7069

7170
type PreparedOpenAIQuicksilverSessionRequest = OpenAIQuicksilverSessionRequest & {
7271
model: string;
73-
voice: string;
7472
};
7573

7674
type PendingOffer = {
@@ -331,7 +329,7 @@ export function createOpenAIQuicksilverBrowserSessionBroker(params: {
331329
) {
332330
throw new Error("Too many concurrent OpenAI realtime sessions for this client");
333331
}
334-
const voice = resolveOpenAIQuicksilverVoice(request.voice);
332+
const voice = isGptLive ? resolveOpenAIQuicksilverVoice(request.voice) : request.voice;
335333
const token = randomBytes(32).toString("base64url");
336334
const expiresAt = Date.now() + OPENAI_QUICKSILVER_PENDING_TTL_MS;
337335
reserveOpenAIQuicksilverSession(token, { expiresAtMs: expiresAt });

‎extensions/openai/realtime-quicksilver-wire.test.ts‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ afterEach(() => {
2525
});
2626

2727
describe("Realtime call creation", () => {
28-
it("uses one multipart /v1/live wire shape for OAuth and API-key auth", async () => {
28+
it("uses the ChatGPT JSON call route for OAuth and preserves the Platform multipart route", async () => {
2929
vi.stubEnv("OPENCLAW_VERSION", "2026.7.2-test");
3030
const requests: Array<{ url: string; init?: RequestInit }> = [];
3131
const fetchImpl = vi.fn(async (url: string | URL | Request, init?: RequestInit) => {
@@ -36,7 +36,7 @@ describe("Realtime call creation", () => {
3636
const session = buildOpenAIQuicksilverSession({
3737
model: "gpt-live-1-codex",
3838
instructions: "Speak briefly.",
39-
voice: "marin",
39+
voice: "spruce",
4040
});
4141

4242
await expect(
@@ -54,7 +54,9 @@ describe("Realtime call creation", () => {
5454
callId: "rtc_1",
5555
sidebandUrl: "wss://api.openai.com/v1/live/rtc_1",
5656
});
57-
expect(requests[0]?.url).toBe("https://api.openai.com/v1/live");
57+
expect(requests[0]?.url).toBe(
58+
"https://chatgpt.com/backend-api/codex/realtime/calls?intent=quicksilver&architecture=avas",
59+
);
5860
expect(requests[0]?.init?.headers).toEqual({
5961
Authorization: "Bearer oauth-token",
6062
"OpenAI-Alpha": "quicksilver=v2",
@@ -65,7 +67,15 @@ describe("Realtime call creation", () => {
6567
"thread-id": "oauth-thread",
6668
version: "2026.7.2-test",
6769
"x-session-id": "oauth-realtime",
68-
"Content-Type": expect.stringMatching(/^multipart\/form-data; boundary=/),
70+
"Content-Type": "application/json",
71+
});
72+
const oauthBody = requests[0]?.init?.body;
73+
if (typeof oauthBody !== "string") {
74+
throw new Error("Expected a JSON request body");
75+
}
76+
expect(JSON.parse(oauthBody)).toEqual({
77+
sdp: "v=oauth-offer\r\n",
78+
session,
6979
});
7080

7181
await expect(
@@ -86,7 +96,7 @@ describe("Realtime call creation", () => {
8696
});
8797
expect(requests[1]?.init?.headers).not.toHaveProperty("chatgpt-account-id");
8898

89-
for (const request of requests) {
99+
for (const request of requests.slice(1)) {
90100
expect(request.url).not.toContain("?");
91101
const headers = request.init?.headers as Record<string, string> | undefined;
92102
const boundary = headers?.["Content-Type"]?.split("boundary=")[1];
@@ -162,7 +172,7 @@ describe("Realtime call creation", () => {
162172
status: 403,
163173
body: "Voice session access denied.",
164174
message:
165-
"GPT-Live rejected the session (403). This overloaded response most often means the voice or model is invalid for /v1/live. Accepted voices: alloy, ash, ballad, cedar, coral, echo, marin, sage, shimmer, verse. Accepted models: gpt-live-1-codex, gpt-live-1-boulder-alpha. Account access may also be unavailable; verify the selected ChatGPT OAuth profile and chatgpt-account-id.",
175+
"GPT-Live rejected the session (403). Verify the selected OpenAI account, model, and GPT-Live voice; this response alone does not identify which was denied.",
166176
},
167177
{
168178
name: "Platform waitlist denial",
@@ -176,7 +186,7 @@ describe("Realtime call creation", () => {
176186
status: 400,
177187
body: "Field `session.model` is not allowed for this Codex realtime session",
178188
message:
179-
"The GPT-Live model value is not permitted on /v1/live. Accepted values are gpt-live-1-codex and gpt-live-1-boulder-alpha.",
189+
"The GPT-Live model value is not permitted. Choose a supported GPT-Live model in Settings > Talk.",
180190
},
181191
])("maps $name", async ({ status, body, message }) => {
182192
const fetchImpl = vi.fn(async () => new Response(body, { status }));

0 commit comments

Comments
 (0)