Repository navigation
chore(server): revert hosted GPT-Live on the connected OpenCode Console - #58461
Conversation
There was a problem hiding this comment.
This is a clean revert of #57735, and the voice routes from before it work unchanged. On dev, nothing still uses the removed pieces.
I started opencode serve from both checkouts. GET /api/experimental/voice/models and POST /api/experimental/voice/session give the same responses on both, and POST …/voice/session/:sessionID/instructions now returns 404 (400 on the base). The voice tests in core, server and client pass, and typecheck:tsc passes in core, protocol, server and client.
Public API impact (removals; these routes are experimental but shipped in v2.1.4):
POST /api/experimental/voice/session/:sessionID/instructions(experimental.voice.instructions) is removed, along withclient.voice.instructions()in the promise and Effect clients (VoiceInstructionsInput/Output/Operation).VoiceModel.integrationandVoiceModel.workspace(both optional) are removed.VoiceSessionResponse.data.session({ id }, optional) is removed.- The Console's
voicekey in/api/v2/configis no longer read; unknown keys are ignored, so older Consoles still work.
This is not backwards compatible for callers of voice.instructions() or anything that reads integration, workspace or session.id. As you noted, the Desktop experiment on beta (#58249) needs updating before the next dev → beta merge. Callers that only use models/session with server keys are unaffected.
No other concerns.
Related: #57576
Issue for this PR
Reverts #57735.
Type of change
What does this PR do?
#57735 special-cased the OpenCode Console for voice: the server read a
voicekey from the Console's/api/v2/configand brokered GPT-Live sessions through the Console. We'd rather keep voice on plain primitives. Voice models will become ordinary provider models listed from models.dev (#58458 is the first step), so a Console-only path isn't worth keeping.Removed:
consoleVoicein theopencodeprovider plugin, and the single host slot inVoice(host,instruct)integrationandworkspaceon voice models, and the optionalsession.idin the session responsePOST /api/experimental/voice/session/:sessionID/instructionsandclient.voice.instructions()Kept: the experimental
/api/experimental/voice/sessionand/api/experimental/voice/modelsendpoints from #55951, #56888 and #57194, using the server's own provider keys. Their OpenAPI paths and schemas are identical to before #57735.Hosted web search goes back to the inline active-connection check it had before #57735 moved it into
resolveActive. Both compare the same fields, so its behavior doesn't change.git revertapplied cleanly, but the textual revert of the OpenAPI documents also dropped an unrelatedretryAfterMsproperty that #57735's regeneration had picked up, so those are regenerated rather than reverted.Coordination, nothing changed here:
beta. Itspackages/app/src/voice/transport.tsrequiresintegration === "opencode", readsresponse.session?.idand callsapi.voice.instructions, so it will fail typecheck at the nextdev→betamerge.voicein/api/v2/config. The server ignores it: the config is decoded withHttpClientResponse.schemaBodyJson(RemoteResponse)and no parse options, and Effect Schema's defaultonExcessProperty: "ignore"drops unknown keys. The existing test "ignores unsupported managed actions, effects, and keys…" already serves an unknown top-level key. I also ran a throwaway test with the exactvoicepayload, and the rest of the config (policies, providers) still loads.CHANGELOG.mdis written at release time. The v2.1.4 notes announced Console-hosted sessions andclient.voice.instructions(), so the next notes should mention they're gone.How did you verify your code works?
f7577a1f^.bun run check:generatedpasses inpackages/client,packages/protocolandservices/www.voiceandplugin/provider-opencode(45 pass), servervoice(1), clientpromise(40), and all 53 core test files that use the shared plugin fixture (446 pass).bun typecheckandbun run typecheck:tscpass in core, protocol, server and client, and the pre-pushbun run checkpasses on Bun 1.4.4.Checklist
Added by the opencode bot (AI-generated).
Related: #57576
Public API: removes experimental voice.instructions endpoint/client method, VoiceModel.integration/workspace and VoiceSessionResponse.session (breaking for their callers)