Repository navigation
feat(server): list experimental voice models - #57194
Merged
Merged
Conversation
3 tasks done
kitlangton
force-pushed
the
voice-models
branch
from
October 21, 2026 05:39
820361b to
debe394
Compare
kitlangton
marked this pull request as ready for review
October 21, 2026 06:13
Contributor
There was a problem hiding this comment.
No blocking problems found. I ran opencode serve from this branch with XAI_API_KEY set and OPENAI_API_KEY set to an empty string. GET /api/experimental/voice/models listed all four models, with only grok-voice-3.0 available and set as the default. Asking voice/session for a transport the model doesn't support now returns a 400 from the shared transports check. The targeted tests and type checks pass in ai, core, server and client.
Public API (additive, backwards compatible):
- Adds
GET /api/experimental/voice/models(experimental.voice.models), with new OpenAPI schemasVoiceModel,VoiceTransportTypeandVoiceModelsResponse. - Adds the client method
client.voice.models(). - Adds
Realtime.enginesand the typeRealtimeTransportTypeto@opencode/ai/experimental. - Changes the error message for a model/transport mismatch on
voice/session, e.g.xAI Grok Voice only supports WebSocket transport→grok-voice-3.0 only supports websocket transport. It is still a 400InvalidRequestError.
vleonbonnet
added a commit
to vleonbonnet/opencode
that referenced
this pull request
Oct 21, 2026
Upstream lists experimental voice models (anomalyco#57194) and edits the Go FAQ (anomalyco#57663). No conflicts; the generated OpenAPI documents and client types match their sources.
5 tasks
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
iOS and desktop clients need to discover which voice models the server can start (and which transports each supports) before initiating a call, rather than guessing a model and hitting a
503 Service Unavailable.What
Realtime.engines(packages/ai/src/experimental/realtime.ts) with each engine's defaultmodel(gpt-live-1,gpt-realtime-2.1,grok-voice-3.0,gemini-3.8-live) and supportedtransports, and validateconnectagainstresolved.transportsso the listing and session handshake cannot drift.Voice.Service.models()(packages/core/src/voice.ts), sharingfindConnection(provider)withVoice.Service.session(input)to check whether an API key or non-empty environment variable connection exists without resolving secret material or calling providers.GET /api/experimental/voice/models(experimental.voice.models) in@opencode/protocol,@opencode/server,@opencode/client, and OpenAPI specs.Integrationtracks one active connection per provider; voice picks the first stored API key or non-empty environment variable connection and skips OAuth/ChatGPT sign-ins.Call-site example
Verification
packages/ai:bun typecheck,bun test test/realtime.test.tspackages/core:bun typecheck,bun run script/test.ts test/voice.test.tspackages/server:bun typecheck,bun test test/voice.test.tspackages/client:bun typecheck,bun test test/promise.test.ts,bun run check:generatedpackages/protocol&services/www:bun run check:generatedAdded by the opencode bot (AI-generated).
Public API: adds GET /api/experimental/voice/models and client.voice.models() (backwards compatible)