Skip to content

feat(desktop): OpenAI-endpoint transcription + configurable STT model in Settings - #817

Merged
agentforce314 merged 1 commit into
mainfrom
fix/desktop-voice-config
Aug 8, 2026
Merged

feat(desktop): OpenAI-endpoint transcription + configurable STT model in Settings#817
agentforce314 merged 1 commit into
mainfrom
fix/desktop-voice-config

Conversation

@agentforce314

Copy link
Copy Markdown
Owner

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 (openaiapi.openai.com/v1, groqapi.groq.com/openai/v1) instead of the provider's chat base_url — which is often a proxy (like 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 ladder: stt.<provider>.modelstt.modelvoice.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/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).

To actually transcribe, put a real OpenAI API key in the openai provider (or set stt.openai.api_key); the chat gateway key won't authenticate against api.openai.com.

🤖 Generated with Claude Code

… 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>
@agentforce314
agentforce314 merged commit 943d42b into main Aug 8, 2026
3 checks passed
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