{"record":{"id":"f5759997324e0a1c","repo":"zed-industries/zed","slug":"model-model-name-not-found-available-availabl","errorCode":null,"errorMessage":"Model {model_name} not found. Available: {available}","messagePattern":"Model (.+?) not found\\. Available: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/eval_cli/src/main.rs","lineNumber":552,"sourceCode":"}\n\nfn selected_model_name(selected: &SelectedModel) -> String {\n    format!(\"{}/{}\", selected.provider.0, selected.model.0)\n}\n\nfn model_not_found_error(model_name: &str, cx: &gpui::App) -> anyhow::Error {\n    let available = LanguageModelRegistry::global(cx)\n        .read(cx)\n        .available_models(cx)\n        .map(|model| format!(\"{}/{}\", model.provider_id().0, model.id().0))\n        .collect::<Vec<_>>();\n    let available = if available.is_empty() {\n        \"(none)\".to_string()\n    } else {\n        available.join(\", \")\n    };\n\n    anyhow::anyhow!(\"Model {model_name} not found. Available: {available}\")\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn anthropic_latest_alias_matches_listed_base_model() {\n        assert!(model_id_matches_selected(\n            &ANTHROPIC_PROVIDER_ID,\n            &LanguageModelId(\"claude-sonnet-4-6\".into()),\n            &LanguageModelId(\"claude-sonnet-4-6-latest\".into()),\n        ));\n    }\n\n    #[test]\n    fn anthropic_thinking_alias_matches_listed_base_model() {\n        assert!(model_id_matches_selected(","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/src/main.rs#L534-L570","documentation":"model_not_found_error builds a diagnostic after the model discovery wait timed out or was skipped: the requested provider/model pair is not among the registry's available_models, and the message enumerates what IS available (or '(none)'). It fires when MODEL_DISCOVERY_TIMEOUT elapsed without the model appearing, meaning the model id is misspelled, not offered by the provider, or discovery failed entirely.","triggerScenarios":"Thrown at crates/eval_cli/src/main.rs:552 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the 'Available:' list in the error and correct the --model provider/model spelling","If the list is '(none)', fix provider configuration/authentication first — discovery produced no models","Increase the discovery wait if the provider catalog is slow to load"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}