{"record":{"id":"295c9cd189aecd80","repo":"Zackriya-Solutions/meetily","slug":"model-not-found","errorCode":null,"errorMessage":"Model {} not found","messagePattern":"Model (.+?) not found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":380,"sourceCode":"                            Err(e) => {\n                                log::warn!(\"Failed to remove file {:?}: {}\", path, e);\n                            }\n                        }\n                    }\n                }\n\n                log::info!(\"Cleaned {} incomplete files from model directory\", removed_count);\n                Ok(())\n            }\n        }\n    }\n\n    /// Load a Parakeet model\n    pub async fn load_model(&self, model_name: &str) -> Result<()> {\n        let models = self.available_models.read().await;\n        let model_info = models\n            .get(model_name)\n            .ok_or_else(|| anyhow!(\"Model {} not found\", model_name))?;\n\n        match model_info.status {\n            ModelStatus::Available => {\n                // Check if this model is already loaded\n                if let Some(current_model) = self.current_model_name.read().await.as_ref() {\n                    if current_model == model_name {\n                        log::info!(\"Parakeet model {} is already loaded, skipping reload\", model_name);\n                        return Ok(());\n                    }\n\n                    // Unload current model before loading new one\n                    log::info!(\"Unloading current Parakeet model '{}' before loading '{}'\", current_model, model_name);\n                    self.unload_model().await;\n                }\n\n                log::info!(\"Loading Parakeet model: {}\", model_name);\n\n                // Load model based on quantization type","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L362-L398","documentation":"load_model looked up model_name in the engine's available_models registry (a map keyed by model name) and found no entry. The engine only loads models it has registered; a name that is not a key - typo, wrong casing, or a registry not yet refreshed - fails here before any status check.","triggerScenarios":"Calling load_model with a name that does not exactly match a registry key: a stale or misspelled id, casing differences, or calling right after a download completed but before available_models was repopulated.","commonSituations":"Frontend hardcodes a model id that drifted from the Rust registry; user pastes a custom model name; a custom models_dir lacking the expected manifest so the registry is empty.","solutions":["List registered models first (the listing API over available_models) and pass an exact returned name","If the model was just downloaded, ensure the registry refresh completes before load_model","Verify custom models_dir contents/manifest when using new_with_models_dir","Include the available names in the error message for quick diagnosis"],"exampleFix":"// before\nlet model_info = models\n    .get(model_name)\n    .ok_or_else(|| anyhow!(\"Model {} not found\", model_name))?;\n\n// after - include the registry contents to make mismatches obvious\nlet model_info = models\n    .get(model_name)\n    .ok_or_else(|| anyhow!(\n        \"Model {} not found. Available: {}\",\n        model_name,\n        models.keys().cloned().collect::<Vec<_>>().join(\", \")\n   ))?;","handlingStrategy":"validation","validationCode":"// Resolve the exact registry key before loading\nlet names: Vec<String> = engine.list_models().await\n    .into_iter().map(|m| m.name).collect();\nif !names.contains(&model_name) {\n    return Err(anyhow!(\"Model {model_name} not registered; available: {}\", names.join(\", \")));\n}","typeGuard":"async fn is_registered_model(engine: &ParakeetEngine, name: &str) -> bool {\n    engine.list_models().await.iter().any(|m| m.name == name)\n}","tryCatchPattern":null,"preventionTips":["Drive the model picker UI from list_models output","Refresh the registry after downloads complete","Match names exactly - registry keys are case-sensitive"],"tags":["parakeet","models","registry","model-loading"],"backgroundTag":"unknown-model-name","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}