Zackriya-Solutions/meetily · error

Model not found

Error message

Model {} not found

What it means

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.

Solutions

  1. List registered models first (the listing API over available_models) and pass an exact returned name
  2. If the model was just downloaded, ensure the registry refresh completes before load_model
  3. Verify custom models_dir contents/manifest when using new_with_models_dir
  4. Include the available names in the error message for quick diagnosis

Example fix

// before
let model_info = models
    .get(model_name)
    .ok_or_else(|| anyhow!("Model {} not found", model_name))?;

// after - include the registry contents to make mismatches obvious
let model_info = models
    .get(model_name)
    .ok_or_else(|| anyhow!(
        "Model {} not found. Available: {}",
        model_name,
        models.keys().cloned().collect::<Vec<_>>().join(", ")
   ))?;
Defensive patterns

Strategy: validation

Validate before calling

// Resolve the exact registry key before loading
let names: Vec<String> = engine.list_models().await
    .into_iter().map(|m| m.name).collect();
if !names.contains(&model_name) {
    return Err(anyhow!("Model {model_name} not registered; available: {}", names.join(", ")));
}

Type guard

async fn is_registered_model(engine: &ParakeetEngine, name: &str) -> bool {
    engine.list_models().await.iter().any(|m| m.name == name)
}

Prevention

When it happens

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

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

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/295c9cd189aecd80. Report an issue: GitHub.

Appendix: source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:438

                    "{} has {} bytes, expected exactly {} bytes",
                    artifact.filename,
                    metadata.len(),
                    artifact.exact_bytes
                ));
            }
        }

        Ok(())
    }

    /// Load a Parakeet model
    pub async fn load_model(&self, model_name: &str) -> Result<()> {
        let model_info = {
            let models = self.available_models.read().await;
            models
                .get(model_name)
                .cloned()
                .ok_or_else(|| anyhow!("Model {} not found", model_name))?
        };

        match &model_info.status {
            ModelStatus::Available => {
                let _lifecycle_guard = self.model_lifecycle_lock.lock().await;
                let current_model = self.current_model_name.read().await.clone();
                if current_model.as_deref() == Some(model_name) {
                    log::info!("Parakeet model {} is already loaded, skipping reload", model_name);
                    return Ok(());
                }

                if let Some(current_model) = current_model {
                    log::info!(
                        "Unloading current Parakeet model '{}' before loading '{}'",
                        current_model,
                        model_name
                    );
                }

View on GitHub (pinned to a2cb62e827)