Zackriya-Solutions/meetily · error

Model file not found: {}. Please download the model '{}' fir

Error message

Model file not found: {}. Please download the model '{}' first.

What it means

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.

Source

Thrown at frontend/src-tauri/src/summary/summary_engine/client.rs:106

            }
        }
    }

    // Cache miss or file deleted - acquire write lock and update cache
    let mut cache = MODEL_PATH_CACHE.write().unwrap();

    // Double-check after acquiring write lock (another thread may have updated it)
    if let Some(path) = cache.get(model_name) {
        if path.exists() {
            return Ok(path.clone());
        }
    }

    // Resolve model path (involves model lookup + filesystem operations)
    let model_path = models::get_model_path(app_data_dir, model_name)?;

    if !model_path.exists() {
        return Err(anyhow!(
            "Model file not found: {}. Please download the model '{}' first.",
            model_path.display(),
            model_name
        ));
    }

    // Cache the validated path
    cache.insert(model_name.to_string(), model_path.clone());
    Ok(model_path)
}

// ============================================================================
// Public API
// ============================================================================

/// Generate text using built-in AI
///
/// # Arguments

View on GitHub (pinned to 0281737d87)

Solutions

  1. Download the model via the model manager's download flow first, then retry generation
  2. Verify a file exists at the printed path; restore or copy the GGUF to <app_data>/models/summary/<gguf_file> if it was moved
  3. If the app data dir was relocated, re-point it or re-download
  4. Add a pre-flight exists() check in the UI and disable Generate until the model is present

Example fix

// caller: gate generation on the model file being present
let path = models::get_model_path(&app_data_dir, model_name)?;
if !path.exists() {
    return Err(anyhow!("Model '{}' not downloaded yet — start the download in Settings", model_name));
}
let text = client::generate_builtin(&app_data_dir, model_name, sys, user, None).await?;
Defensive patterns

Strategy: validation

Validate before calling

// Run before invoking generation
let path = models::get_model_path(&app_data_dir, model_name)?;
if !path.exists() {
    return Err(anyhow!("Model '{}' not downloaded — download it in Settings first", model_name));
}
// alternatively check manager status: list_models() -> status == Downloaded

Try / catch

match generate_builtin(...).await {
    Err(e) if e.to_string().starts_with("Model file not found") => {
        prompt_user_to_download(model_name) // then retry once after download completes
    }
    other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/b7d9695809f125f1. Report an issue: GitHub.