feat(desktop): OpenAI-endpoint transcription + configurable STT model in Settings - #817
Merged
Merged
Conversation
… in Settings
Two follow-ups to the voice fixes:
1. Use the real OpenAI endpoint with an OpenAI key. STT now defaults to the
provider's CANONICAL audio endpoint (openai -> api.openai.com/v1, groq ->
api.groq.com/openai/v1) instead of the provider's chat base_url, which is
often a proxy (e.g. a LiteLLM gateway) with no /audio/transcriptions route.
So with an OpenAI key present, voice transcribes against api.openai.com out
of the box. Fully overridable via stt.<provider>.{base_url,api_key,model}
or voice.stt_{base_url,api_key,model}.
2. Configure the transcription model in-app. Settings -> Voice now renders the
STT provider + per-provider transcription model, backed by:
- a focused /api/config/schema (stt.enabled, stt.provider select,
stt.openai.model, stt.groq.model, voice.auto_tts), and
- PUT /api/config, which serve was missing entirely — it deep-merges the
renderer's (secret-redacted) draft over the stored config so api_keys and
the env block survive, and unwraps saveClawCodexConfig's {config:{…}}
envelope. This is what makes ALL in-app settings edits persist, not just
voice.
Model resolution: stt.<provider>.model -> stt.model -> voice.stt_model ->
provider default (whisper-1 / whisper-large-v3). The failure message now
points at Settings -> Voice.
Verified live: the Voice panel renders the STT provider + model fields; saving
persists to config and survives a reload with api_keys/env intact; STT
resolves to https://api.openai.com/v1 with the openai key. 65 desktop tests
green (5 new: canonical endpoint, explicit stt override, model resolution
ladder, PUT deep-merge preserving secrets, schema exposes the model field).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Two follow-ups to the voice fixes, per request.
1. Use the real OpenAI endpoint with an OpenAI key
STT now defaults to the provider's canonical audio endpoint (
openai→api.openai.com/v1,groq→api.groq.com/openai/v1) instead of the provider's chatbase_url— which is often a proxy (like a LiteLLM gateway) with no/audio/transcriptionsroute. So with an OpenAI key present, voice transcribes against api.openai.com out of the box. Fully overridable viastt.<provider>.{base_url,api_key,model}orvoice.stt_{base_url,api_key,model}.2. Configure the transcription model in-app
Settings → Voice now renders the STT provider + per-provider transcription model, backed by:
/api/config/schema(stt.enabled,stt.providerselect,stt.openai.model,stt.groq.model,voice.auto_tts), andPUT /api/config, which serve was missing entirely. It deep-merges the renderer's (secret-redacted) draft over the stored config so api_keys and the env block survive, and unwrapssaveClawCodexConfig's{config:{…}}envelope. This is what makes all in-app settings edits persist, not just voice.Model resolution ladder:
stt.<provider>.model→stt.model→voice.stt_model→ provider default (whisper-1 / whisper-large-v3). The failure message now points at Settings → Voice.Verified live
The Voice panel renders the STT provider + model fields (with the schema descriptions); saving persists to config and survives a reload with api_keys/env intact; STT resolves to
https://api.openai.com/v1with the openai key. 65 desktop tests green (5 new: canonical endpoint, explicit stt override, model-resolution ladder, PUT deep-merge preserving secrets, schema exposes the model field).🤖 Generated with Claude Code