Repository navigation
Description
Description / 问题 The "Verify" / "Re-verify" button on the foundry-local-whisper ASR channel always reports "验证失败" (Verification failed) with no reason, even though local transcription works correctly. This is a front-end routing bug: the channel is not in the local-model whitelist, so verification is sent down the generic cloud credential validation path, which requires an API key that a local engine does not have. Foundry Local Whisper 渠道的「验证 / 重新验证」按钮永远显示「验证失败」,但实际语音转写功能正常。根因是前端白名单漏了 foundry-local-whisper,导致验证走了云服务商的「凭据校验」路径,去要一个本地引擎根本没有的 API Key。 Environment / 环境 OpenLess 2.0 (Windows x64, installed via official installer) Windows 10 22H2 (build 19045) Foundry Local Whisper whisper-small — model and native runtime fully downloaded Windows App Runtime 1.8 x86+x64: all framework/main/singleton/DDLM packages installed and probed OK Steps to reproduce / 复现步骤 1. Settings → Speech Recognition → add/enable channel Local Whisper (Foundry Local) (foundry-local-whisper). 2. Local Models page: select whisper-small, download model + runtime; confirm both are ready. 3. Confirm real dictation works: press hotkey, speak, text is inserted at cursor. 4. On the channel card, click Verify / Re-verify. 5. Result: 验证失败 (failedPlain, no reason). Repeating never succeeds. Expected / 预期 Verification should use the local-model probe (local_asr_test_channel): load the model, transcribe the built-in audio sample, and report 验证通过. Actual / 实际 Card shows 验证失败 · validateFailed; openless.log contains no [local-asr verify] entry at all — the local verification command is never invoked. Meanwhile real dictation succeeds. Example log from this machine: [asr] provider=foundry-local-whisper label=... model: Some("whisper-small") elapsed_ms=10602 chars=7
[insert-diagnostics] attempt=1 operation=insert_final result=Ok(Inserted) and Foundry log: CoreAudioTranscribe Status:Success Time:3246ms. Root cause / 根因 In openless-all/app/src/features/providers/ChannelList.tsx, runTest() branches on channelTestMode(): const result =
mode === 'local-model'
? await testLocalAsrChannel(channel.id).then(() => ({ ok: true }))
: await validateProviderCredentials(kind, channel.id); In openless-all/app/src/features/providers/channelCatalog.ts, LOCAL_MODEL_CHANNEL_PROVIDERS omits foundry-local-whisper: export const LOCAL_MODEL_CHANNEL_PROVIDERS = new Set([
'local-qwen3', 'local-qwen3-mlx', 'local-qwen3-c',
'local-whisper', 'sherpa-onnx-local',
// missing: 'foundry-local-whisper'
]); So channelTestMode('asr', 'foundry-local-whisper', ...) returns 'provider', not 'local-model'. The channel is then validated as a cloud provider (API key required) and always fails. The backend command local_asr_test_channel(channel_id) itself already supports Foundry — it is simply never called. The omission is also a test gap: openless-all/app/src/features/providers/ChannelList.test.ts lists foundry-local-whisper in its localProviders array, but the loop asserting channelTestMode(...) === 'local-model' does not include it. Suggested fix / 建议修复 1. Add 'foundry-local-whisper' to LOCAL_MODEL_CHANNEL_PROVIDERS in channelCatalog.ts. 2. Add it to the channelTestMode assertion loop in ChannelList.test.ts to prevent regression. Impact / 影响 Cosmetic but misleading: transcription works, yet the UI permanently displays a failure, which makes users believe the local model is broken and can trigger unnecessary reinstalls / model re-downloads.
Activity