Skip to content

fix(transcriber): fall back to engine default on a foreign model ID - #29

Merged
sumerc merged 1 commit into
mainfrom
fix/local-model-engine-fallback
Aug 5, 2026
Merged

fix(transcriber): fall back to engine default on a foreign model ID#29
sumerc merged 1 commit into
mainfrom
fix/local-model-engine-fallback

Conversation

@sumerc

@sumerc sumerc commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Independent of the Qwen POC (#28) — found while testing it, but it affects
Parakeet ↔ Whisper switching today.

The bug

A local provider reads its model ID from config.json and hard-errors when that
ID belongs to a different engine. That is the normal state right after any
provider switch: the persisted ID is whatever the previous provider had
selected, and it reaches the new provider via SetModel before the tray ever
offers this engine's model list.

Result: every recording fails with unknown <engine> model "<other-engine-id>"
until the user happens to open the model menu and pick something.

The fix

Fall back to the provider's own default instead of erroring
(transcriber/local.go).

Safe because the default is by construction the right engine's file. What must
never happen is loading another engine's weights — that is a multi-minute hang
rather than a clean error, per the note at local.go:102 — and that is still
rejected.

Tests pass; Parakeet and Whisper both verified transcribing after the change.

🤖 Generated with Claude Code

A local provider read its model ID from config.json and hard-errored when
that ID belonged to a different engine, which is the normal state right
after any provider switch: the persisted ID is whatever the PREVIOUS
provider had selected, and it reaches the new provider via SetModel before
the tray ever offers this engine's model list.

The result was that every recording failed with `unknown <engine> model
"<other-engine-id>"` until the user happened to open the model menu and
pick something. Fall back to the provider's own default instead.

Falling back is safe because the default is by construction the right
engine's file. What must never happen is loading another engine's weights,
and that is still rejected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@upsun-dispatch-dev

Copy link
Copy Markdown

📋 PR Summary

This PR changes local (on-device) transcription providers so that when config.json holds a model ID belonging to a different engine — the normal state right after a provider switch — load() falls back to the engine's own default instead of hard-erroring every recording. It touches only transcriber/local.go (the fallback branch plus a new defaultID field) and adds a CHANGELOG entry.

Changes
Layer / File(s) Summary
local provider fallback
transcriber/local.go Adds a defaultID field and a fallback branch in load(): when the desired model ID is unknown or belongs to another engine, rewrite modelID to this engine's default rather than returning an unknown <engine> model error. Loading another engine's weights is still rejected.
changelog
CHANGELOG.md Documents the behavior change that local providers no longer fail every recording on a foreign persisted model ID.

Comment thread transcriber/local.go
Comment thread transcriber/local.go
@sumerc
sumerc merged commit 8993ac1 into main Aug 5, 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