Zackriya-Solutions/meetily · warning · anyhow::Error
Model '{}' not found
Error message
Model '{}' not found What it means
delete_model looks up model_name in the in-memory available_models registry and this error is thrown when the key is absent. It is a pure registry lookup failure — no file operation is attempted. Names are exact, case-sensitive catalog keys.
Source
Thrown at frontend/src-tauri/src/whisper_engine/whisper_engine.rs:841
if buffer.starts_with(b"ggml") || buffer.starts_with(b"GGUF") || buffer.starts_with(b"ggmf") ||
buffer.starts_with(b"lmgg") || buffer.starts_with(b"FUGU") || buffer.starts_with(b"fmgg") {
Ok(())
} else {
Err(anyhow!("Invalid model file: missing GGML/GGUF magic number. Found: {:?}",
String::from_utf8_lossy(&buffer[..4])))
}
}
pub async fn delete_model(&self, model_name: &str) -> Result<String> {
log::info!("Attempting to delete model: {}", model_name);
// Get model info to find the file path
let model_info = {
let models = self.available_models.read().await;
models.get(model_name).cloned()
};
let model_info = model_info.ok_or_else(|| anyhow!("Model '{}' not found", model_name))?;
// Check if model is corrupted before allowing deletion
log::info!("Model '{}' has status: {:?}", model_name, model_info.status);
match &model_info.status {
ModelStatus::Corrupted { file_size, expected_min_size } => {
log::info!("Deleting corrupted model '{}' (file size: {} bytes, expected min: {} bytes)",
model_name, file_size, expected_min_size);
// Delete the file
if model_info.path.exists() {
fs::remove_file(&model_info.path).await
.map_err(|e| anyhow!("Failed to delete file '{}': {}", model_info.path.display(), e))?;
log::info!("Successfully deleted corrupted file: {}", model_info.path.display());
} else {
log::warn!("File '{}' does not exist, nothing to delete", model_info.path.display());
}
// Update model status to MissingView on GitHub (pinned to 0281737d87)
Solutions
- Call get_models / list_models first and pass the exact id string from the registry
- Use exact catalog keys: tiny, base, small, medium, large-v3-turbo, large-v3, tiny-q5_1, base-q5_1, small-q5_1, medium-q5_0, large-v3-turbo-q5_0, large-v3-q5_0
- For a custom ggml file not in the catalog, delete ggml-<name>.bin from the models directory manually
Example fix
// before
await invoke('delete_model', { modelName: 'Base' }); // 'not found'
// after
const models = await invoke<ModelInfo[]>('get_whisper_models');
const target = models.find(m => m.name.toLowerCase() === 'base');
if (target) await invoke('delete_model', { modelName: target.name }); Defensive patterns
Strategy: validation
Validate before calling
const models = await invoke<ModelInfo[]>('get_whisper_models');
const exists = models.some(m => m.name === modelName);
if (!exists) throw new Error(`Unknown model '${modelName}'. Known: ${models.map(m => m.name).join(', ')}`);
await invoke('delete_model', { modelName }); Type guard
const isKnownModel = (name: string, models: ModelInfo[]): boolean => models.some(m => m.name === name);
Try / catch
try {
await invoke('delete_model', { modelName });
} catch (e) {
if (String(e).includes('not found')) { refreshModelList(); } else { throw e; }
} Prevention
- Always source model ids from get_whisper_models, never hardcode strings in the UI
- Keep the frontend catalog and the Rust URL match arm in one shared list when possible
- Model keys are case-sensitive: pass machine ids, not display labels
When it happens
Trigger: Calling delete_model with a typo'd or case-mismatched name ('Base' vs 'base'); using a display label instead of the model id; calling delete before the model registry has been scanned/initialized.
Common situations: Frontend list out of sync with the Rust catalog (e.g. 'base-q5' vs the real key 'base-q5_1'); stale reference after the catalog changed between versions; assuming arbitrary file names in the models dir are deletable by name.
Related errors
- Model {} is currently downloading
- Model {} has error: {}
- Unsupported model: {}
- Whisper engine not initialized
- Parakeet model '{}' not found
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/c5667fc50555f557.
Report an issue: GitHub.