Skip to content

Forward GPT-Live voice calls to the ChatGPT realtime/calls endpoint - #21

Open
fancyspace78 wants to merge 2 commits into
fish2lab:mainfrom
fancyspace78:agent/gpt-live-voice
Open

Forward GPT-Live voice calls to the ChatGPT realtime/calls endpoint#21
fancyspace78 wants to merge 2 commits into
fish2lab:mainfrom
fancyspace78:agent/gpt-live-voice

Conversation

@fancyspace78

@fancyspace78 fancyspace78 commented Aug 18, 2026

Copy link
Copy Markdown

What changed

The router now forwards the ChatGPT desktop app's GPT-Live voice calls. POST /v1/live bodies (a multipart/form-data payload with an sdp part and a JSON session part) are parsed and re-encoded as the official JSON shape {"sdp": "...", "session": {...}}, then sent to chatgpt.com/backend-api/codex/realtime/calls.

To match the official client's request shape, the forwarded request includes:

  • query params intent=quicksilver&architecture=avas
  • header OpenAI-Alpha: quicksilver=v2 (the backend gate rejects anything else)
  • the client's full original header set (cookies, integrity-state, DeviceCheck, …), because this endpoint sits behind stricter Cloudflare checks than /responses

Non-multipart POST /v1/live bodies are still passed through unchanged.

Why

Voice in the desktop app is driven by GPT-Live over WebRTC. Because the app routes all model traffic through the configured openai_base_url, those call-creation requests reach the router as POST /v1/live. Before this change the body was treated as JSON and forwarded to /backend-api/codex/v1/live, so voice failed with a series of upstream 400/403/404 responses. DeepSeek routing and the existing prefer_websockets = false upgrade handling (426) are unchanged; voice is never routed to DeepSeek.

Validation

  • npm test: 88 pass, 2 skipped, 0 fail, including new tests for the multipart→JSON conversion, the single-path mapping, and the AVAS query/header injection
  • Verified end-to-end on a real ChatGPT desktop session: a GPT-Live voice call completes through the router

Tested environment

  • macOS (Apple Silicon) + ChatGPT desktop app
  • Outbound traffic goes through a local HTTP proxy (VPN); the router reaches chatgpt.com through it, and voice completes end-to-end in that setup

Docs

Updated AGENTS.md and both READMEs so Voice is no longer described as an unrouted client-side feature.

@fancyspace78
fancyspace78 marked this pull request as ready for review August 18, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant