{"record":{"id":"29d6165255b5584c","repo":"aaif-goose/goose","slug":"local-whisper-model-not-configured","errorCode":null,"errorMessage":"Local Whisper model not configured","messagePattern":"Local Whisper model not configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose/src/dictation/providers.rs","lineNumber":142,"sourceCode":"            .and_then(|v| v.as_str().map(|s| s.to_string()))\n            .and_then(|id| super::whisper::get_model(&id))\n            .is_some_and(|m| m.is_downloaded()),\n        _ => {\n            let def = get_provider_def(provider);\n            config.get_secret::<String>(def.config_key).is_ok()\n        }\n    }\n}\n\n#[cfg(feature = \"local-inference\")]\npub async fn transcribe_local(audio_bytes: Vec<u8>) -> Result<String> {\n    tokio::task::spawn_blocking(move || {\n        let config = Config::global();\n        let model_id = config\n            .get(LOCAL_WHISPER_MODEL_CONFIG_KEY, false)\n            .ok()\n            .and_then(|v| v.as_str().map(|s| s.to_string()))\n            .ok_or_else(|| anyhow::anyhow!(\"Local Whisper model not configured\"))?;\n\n        let model = super::whisper::get_model(&model_id)\n            .ok_or_else(|| anyhow::anyhow!(\"Unknown model: {}\", model_id))?;\n        let model_path = model.local_path();\n\n        let mut transcriber_lock = LOCAL_TRANSCRIBER\n            .lock()\n            .map_err(|e| anyhow::anyhow!(\"Failed to lock transcriber: {}\", e))?;\n\n        let model_path_str = model_path.to_string_lossy().to_string();\n        let needs_reload = match transcriber_lock.as_ref() {\n            None => true,\n            Some((cached_path, _)) => cached_path != &model_path_str,\n        };\n\n        if needs_reload {\n            tracing::info!(\"Loading Whisper model from: {}\", model_path.display());\n","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/dictation/providers.rs#L124-L160","documentation":"Local dictation (feature `local-inference`) reads the Whisper model id from the goose config key LOCAL_WHISPER_MODEL (whisper.rs:11). transcribe_local fails with this error when that key is missing or its value is not a string — before any model lookup or transcription starts.","triggerScenarios":"Using DictationProvider::Local without ever configuring the model: Config::global().get(LOCAL_WHISPER_MODEL, ...) returns None or a non-string value, so the `.ok()`/`as_str()` chain yields None.","commonSituations":"Fresh installs where local dictation was selected but no model was chosen; the config key was deleted; the value was written as a non-string type (number/bool) in the config file.","solutions":["Set the key to one of the supported model ids: tiny, base, small, or medium — e.g. `goose config set --params LOCAL_WHISPER_MODEL tiny`","Use whisper::recommend_model() to pick an id matching your hardware (small on GPU/Metal, base/tiny on CPU)","Confirm with is_configured(DictationProvider::Local) before invoking transcription"],"exampleFix":"# before\n# LOCAL_WHISPER_MODEL unset -> transcribe_local() errors\n\n# after\ngoose config set --params LOCAL_WHISPER_MODEL small","handlingStrategy":"validation","validationCode":"use goose::config::Config;\nuse goose::dictation::whisper::LOCAL_WHISPER_MODEL_CONFIG_KEY;\n\nfn local_whisper_ready() -> bool {\n    Config::global()\n        .get(LOCAL_WHISPER_MODEL_CONFIG_KEY, false)\n        .ok()\n        .and_then(|v| v.as_str().map(|s| s.to_string()))\n        .is_some()\n}\n\n// or use the built-in readiness check that also verifies the model is downloaded:\n// is_configured(DictationProvider::Local)","typeGuard":"fn local_whisper_ready() -> bool {\n    Config::global()\n        .get(\"LOCAL_WHISPER_MODEL\", false)\n        .ok()\n        .and_then(|v| v.as_str().map(|s| s.to_string()))\n        .is_some()\n}","tryCatchPattern":null,"preventionTips":["Gate the Local dictation option in the UI on is_configured(DictationProvider::Local)","Store the model id as a plain string in config — never a number or bool","On fresh installs, run model selection (recommend_model) before enabling local dictation"],"tags":["dictation","whisper","config","local-inference"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}