Skip to content

fix(stt): map cloud-only model names to default local model for faster-whisper#2731

Closed
amethystani wants to merge 1 commit into
NousResearch:mainfrom
amethystani:fix/local-stt-rejects-whisper-1
Closed

fix(stt): map cloud-only model names to default local model for faster-whisper#2731
amethystani wants to merge 1 commit into
NousResearch:mainfrom
amethystani:fix/local-stt-rejects-whisper-1

Conversation

@amethystani

Copy link
Copy Markdown
Contributor

Summary

The setup wizard writes stt.model: "whisper-1" to config.yaml (the OpenAI API model identifier). When the local faster-whisper provider is active, this value was passed directly to WhisperModel() which rejects it with:

Invalid model size 'whisper-1', expected one of: tiny, base, small, medium, large...

The crash was swallowed by the caller, so voice messages were silently ignored.

Fix

In transcribe_audio(), the local provider path now calls _normalize_local_command_model() on the raw model name before passing it to _transcribe_local(). This function already existed and is already used by the local_command path — it maps any cloud-only model name (whisper-1, gpt-4o-transcribe, whisper-large-v3, …) to DEFAULT_LOCAL_MODEL ("base").

A WARNING log is emitted when the substitution occurs so users can see why their configured model name is being ignored.

Closes #2544

…r-whisper

The setup wizard writes stt.model: 'whisper-1' to config.yaml (the
OpenAI API model name). When the local faster-whisper provider is used,
this value is passed directly to WhisperModel(), which crashes with
'Invalid model size whisper-1, expected one of: tiny, base, small,
medium, large...' and silently drops the voice message.

_transcribe_local_command() already calls _normalize_local_command_model()
to guard against this — apply the same normalisation to the
_transcribe_local() path. A WARNING log entry is emitted when the
substitution happens so users know why their configured model name is
being ignored.

Closes NousResearch#2544
@teknium1

Copy link
Copy Markdown
Contributor

Closed in favor of PR #13016 #13016 which fixes the same issue with full test coverage. Your approach of reusing the existing normalize function was correct. Thanks @amethystani!

@teknium1 teknium1 closed this Apr 20, 2026
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.

[Bug]: Local STT provider crashes when config contains OpenAI model name ("whisper-1")

2 participants