{"record":{"id":"b7d9695809f125f1","repo":"Zackriya-Solutions/meetily","slug":"model-file-not-found-please-download-the-mode","errorCode":null,"errorMessage":"Model file not found: {}. Please download the model '{}' first.","messagePattern":"Model file not found: (.+?)\\. Please download the model '(.+?)' first\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/summary/summary_engine/client.rs","lineNumber":106,"sourceCode":"            }\n        }\n    }\n\n    // Cache miss or file deleted - acquire write lock and update cache\n    let mut cache = MODEL_PATH_CACHE.write().unwrap();\n\n    // Double-check after acquiring write lock (another thread may have updated it)\n    if let Some(path) = cache.get(model_name) {\n        if path.exists() {\n            return Ok(path.clone());\n        }\n    }\n\n    // Resolve model path (involves model lookup + filesystem operations)\n    let model_path = models::get_model_path(app_data_dir, model_name)?;\n\n    if !model_path.exists() {\n        return Err(anyhow!(\n            \"Model file not found: {}. Please download the model '{}' first.\",\n            model_path.display(),\n            model_name\n        ));\n    }\n\n    // Cache the validated path\n    cache.insert(model_name.to_string(), model_path.clone());\n    Ok(model_path)\n}\n\n// ============================================================================\n// Public API\n// ============================================================================\n\n/// Generate text using built-in AI\n///\n/// # Arguments","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/summary/summary_engine/client.rs#L88-L124","documentation":"The summary engine resolved the model name from its built-in registry (qwen3.5:2b, qwen3.5:4b, gemma3:4b, gemma3:1b) but the GGUF file does not exist under <app_data>/models/summary/. The path cache is re-validated with exists(), so this fires when the model was never downloaded or its file was deleted/moved afterwards.","triggerScenarios":"Invoking built-in AI generation with a registered model whose GGUF was never downloaded; deleting the models directory while the app runs (stale cached path is caught by the exists() re-check); a failed download leaving no usable file.","commonSituations":"User picks a model in settings and hits Generate before downloading; OS cleaner tools removing multi-GB model files; migrating app data to a new machine without copying models/summary.","solutions":["Download the model via the model manager's download flow first, then retry generation","Verify a file exists at the printed path; restore or copy the GGUF to <app_data>/models/summary/<gguf_file> if it was moved","If the app data dir was relocated, re-point it or re-download","Add a pre-flight exists() check in the UI and disable Generate until the model is present"],"exampleFix":"// caller: gate generation on the model file being present\nlet path = models::get_model_path(&app_data_dir, model_name)?;\nif !path.exists() {\n    return Err(anyhow!(\"Model '{}' not downloaded yet — start the download in Settings\", model_name));\n}\nlet text = client::generate_builtin(&app_data_dir, model_name, sys, user, None).await?;","handlingStrategy":"validation","validationCode":"// Run before invoking generation\nlet path = models::get_model_path(&app_data_dir, model_name)?;\nif !path.exists() {\n    return Err(anyhow!(\"Model '{}' not downloaded — download it in Settings first\", model_name));\n}\n// alternatively check manager status: list_models() -> status == Downloaded","typeGuard":null,"tryCatchPattern":"match generate_builtin(...).await {\n    Err(e) if e.to_string().starts_with(\"Model file not found\") => {\n        prompt_user_to_download(model_name) // then retry once after download completes\n    }\n    other => other,\n}","preventionTips":["Gate the Generate action on the model being in Downloaded status in the UI","Re-verify model files at app startup (they can be deleted externally) and refresh the status cache","Include models/summary in backup/migration checklists when moving app data"],"tags":["model","file-not-found","llm","rust"],"backgroundTag":"model-file-missing","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}