{"record":{"id":"21127f10aaf697af","repo":"Zackriya-Solutions/meetily","slug":"unknown-model-21127f","errorCode":null,"errorMessage":"Unknown model: {}","messagePattern":"Unknown model: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/summary/summary_engine/models.rs","lineNumber":237,"sourceCode":"}\n\n/// Get a specific model by name\npub fn get_model_by_name(name: &str) -> Option<ModelDef> {\n    get_available_models().into_iter().find(|m| m.name == name)\n}\n\n/// Get the default model (first in list)\npub fn get_default_model() -> ModelDef {\n    get_available_models()\n        .into_iter()\n        .next()\n        .expect(\"At least one model must be defined\")\n}\n\n/// Resolve model name to full file path in the models directory\npub fn get_model_path(app_data_dir: &PathBuf, model_name: &str) -> Result<PathBuf> {\n    let model = get_model_by_name(model_name)\n        .ok_or_else(|| anyhow!(\"Unknown model: {}\", model_name))?;\n\n    let models_dir = get_models_directory(app_data_dir);\n    let model_path = models_dir.join(&model.gguf_file);\n\n    Ok(model_path)\n}\n\n/// Get the models directory path for built-in AI\npub fn get_models_directory(app_data_dir: &PathBuf) -> PathBuf {\n    app_data_dir.join(\"models\").join(\"summary\")\n}\n\n// ============================================================================\n// Prompt Templates (Model-Specific Formatting)\n// ============================================================================\n\n/// Gemma 3 chat template format\npub const GEMMA3_TEMPLATE: &str = \"\\","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/summary/summary_engine/models.rs#L219-L255","documentation":"get_model_path maps a model name to app_data_dir/models/summary/<gguf_file> via get_model_by_name. An unknown name - anything not in the static catalog - fails here before any filesystem access happens.","triggerScenarios":"Passing a name that is not a ModelDef.name to get_model_path: typo, casing error, a stale persisted model preference, or accidentally passing a whisper model name where a summary (LLM) model name is required.","commonSituations":"Settings stored by an older build referencing a removed/renamed model; confusion between the whisper model list and the summary-engine model list; frontend sending the display label instead of the internal name.","solutions":["Use a name returned by get_available_models() for the summary engine","Verify the exact string - matching is verbatim and case-sensitive","Reset the stored model preference so the code falls back to get_default_model()"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let model = get_model_by_name(model_name)\n    .ok_or_else(|| anyhow!(\"unknown model {:?}; valid: {:?}\",\n        model_name,\n        get_available_models().iter().map(|m| m.name.clone()).collect::<Vec<_>>()))?;\nlet path = get_model_path(app_data_dir, &model.name)?;","typeGuard":"fn is_known_model(name: &str) -> bool {\n    get_model_by_name(name).is_some()\n}","tryCatchPattern":null,"preventionTips":["Derive paths from names freshly resolved via get_available_models() each session","Do not mix whisper model names into summary-model path lookups (separate catalogs)","Fall back to get_default_model() when a persisted name fails validation"],"tags":["models","path","validation","api-misuse"],"backgroundTag":"unknown-model-name","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}