Zackriya-Solutions/meetily · error
Unknown model: {}
Error message
Unknown model: {} What it means
models::get_model_by_name performs an exact string match against the hardcoded registry; None produces this error. Valid names are 'qwen3.5:2b', 'qwen3.5:4b', 'gemma3:4b', 'gemma3:1b' — the ':size' suffix is part of the id. Any casing difference, whitespace, or a name from another engine's list fails.
Source
Thrown at frontend/src-tauri/src/summary/summary_engine/client.rs:152
app_data_dir: &PathBuf,
model_name: &str,
system_prompt: &str,
user_prompt: &str,
cancellation_token: Option<&CancellationToken>,
) -> Result<String> {
// Check cancellation at start
if let Some(token) = cancellation_token {
if token.is_cancelled() {
return Err(anyhow!("Generation cancelled before starting"));
}
}
log::info!("Built-in AI generation request");
log::info!("Model: {}", model_name);
// Get model definition
let model_def = models::get_model_by_name(model_name)
.ok_or_else(|| anyhow!("Unknown model: {}", model_name))?;
// Resolve model path with caching (avoids repeated filesystem I/O)
let model_path = get_cached_model_path(app_data_dir, model_name)?;
// Apply model-specific chat template
let formatted_prompt =
models::format_prompt(&model_def.template, system_prompt, user_prompt)?;
// Get or initialize sidecar manager
let manager = {
let mut global_manager = SIDECAR_MANAGER.lock().await;
if global_manager.is_none() {
log::info!("Initializing sidecar manager");
let new_manager = SidecarManager::new(app_data_dir.clone())?;
*global_manager = Some(Arc::new(new_manager));
}
global_manager.clone().unwrap()
};
View on GitHub (pinned to 0281737d87)
Solutions
- Use an exact registry name including the size suffix, e.g. 'gemma3:1b'
- Populate the model picker from get_available_models()/the list-models command instead of hardcoding names in the frontend
- Validate the stored preference at startup and fall back to get_default_model() when it is unknown
- Trim input before passing model names across the Tauri boundary
Example fix
// caller: normalize + validate before generating
let model_name = model_name.trim();
let model_def = models::get_model_by_name(model_name)
.unwrap_or_else(models::get_default_model);
let text = client::generate_builtin(&app_data_dir, &model_def.name, sys, user, None).await?; Defensive patterns
Strategy: validation
Validate before calling
let model_name = input.trim();
if models::get_model_by_name(model_name).is_none() {
return Err(anyhow!("Unknown model '{}' — valid: {:?}",
model_name,
models::get_available_models().iter().map(|m| m.name.clone()).collect::<Vec<_>>()));
} Type guard
// Narrow to a known model id before calling into the engine
fn known_model(name: &str) -> Option<&'static str> {
const KNOWN: [&str; 4] = ["qwen3.5:2b", "qwen3.5:4b", "gemma3:4b", "gemma3:1b"];
KNOWN.iter().find(|m| **m == name.trim()).copied()
} Prevention
- Drive model pickers from get_available_models() so ids never drift from the registry
- Validate persisted preferences at startup; reset to get_default_model() when unknown
- Pass the exact id (with ':size' suffix), never the display name
When it happens
Trigger: Passing 'gemma3' instead of 'gemma3:4b'; passing a whisper/parakeet model id to the summary engine; a persisted settings value referencing a model removed from the registry in a newer app version.
Common situations: Stored user preference survives an app update that renamed models; frontend dropdown bound to the wrong field; copy-pasted ids with stray whitespace.
Related errors
- Model file not found: {}. Please download the model '{}' fir
- Unknown model: {}
- Generation failed: {}
- Sidecar error: {}
- Model '{}' not found
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/0c96cc0b9710a35c.
Report an issue: GitHub.