Skip to content

fix(transcription): make self-hosted model configurable#1043

Open
xAlcahest wants to merge 1 commit into
OpenWhispr:mainfrom
xAlcahest:fix/self-hosted-transcription-model
Open

fix(transcription): make self-hosted model configurable#1043
xAlcahest wants to merge 1 commit into
OpenWhispr:mainfrom
xAlcahest:fix/self-hosted-transcription-model

Conversation

@xAlcahest

Copy link
Copy Markdown
Collaborator

Summary

In self-hosted mode the model was never configurable: getTranscriptionModel() in audioManager.js has no self-hosted branch, so it resolved the model from leftover cloud provider settings and for a fresh setup always fell back to gpt-4o-mini-transcribe, which most self-hosted servers reject with model_not_found. The self-hosted panel now has a Model field (stored as remoteTranscriptionModel) that is sent verbatim when set; left empty, everything behaves exactly as before.

Tracing the same path also showed that shouldUseStreaming() never checked self-hosted mode: a self-hosted user with a stored OpenAI key and the default realtime model was silently routed to OpenAI's realtime WebSocket instead of their own server. Self-hosted mode now always goes through batch HTTP to the configured URL.

Fixes #1013

Changes

  • src/helpers/selfHostedTranscription.js: new helper with isSelfHostedTranscription and resolveSelfHostedTranscriptionModel
  • src/helpers/audioManager.js: getTranscriptionModel returns the self-hosted model when set, shouldUseStreaming returns false in self-hosted mode
  • src/helpers/transcriptionAuth.js: shouldSkipTranscriptionApiKey delegates to the shared predicate
  • src/stores/settingsStore.ts: new remoteTranscriptionModel key with setter
  • src/hooks/useSettings.ts: expose the new key and setter
  • src/components/SelfHostedPanel.tsx: optional model input, rendered only when wired
  • src/components/SettingsPage.tsx: pass the model field through the transcription section
  • test/helpers/selfHostedTranscription.test.js: node --test coverage for the helper

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.

Self Hosted - model seems to be hard coded to gpt-4o-mini-transcribe

1 participant