{"record":{"id":"dc9538d77b62c610","repo":"warpdotdev/warp","slug":"unknown-model-id-model-id-try-one-of-sugges","errorCode":null,"errorMessage":"Unknown model id '{model_id}'. Try one of: {suggestions}","messagePattern":"Unknown model id '(.+?)'\\. Try one of: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/common.rs","lineNumber":71,"sourceCode":"    model_id: &str,\n    valid_ids: &[LLMId],\n    list_unavailable: bool,\n) -> anyhow::Result<LLMId> {\n    let llm_id: LLMId = model_id.into();\n    if valid_ids.contains(&llm_id) {\n        Ok(llm_id)\n    } else if list_unavailable {\n        Err(anyhow::anyhow!(\n            \"Could not retrieve the agent-mode model list from the server \\\n             (the request failed or returned no models). Try again later.\"\n        ))\n    } else {\n        let suggestions = valid_ids\n            .iter()\n            .map(|id| id.to_string())\n            .collect::<Vec<_>>()\n            .join(\", \");\n        Err(anyhow::anyhow!(\n            \"Unknown model id '{model_id}'. Try one of: {suggestions}\"\n        ))\n    }\n}\n\npub(super) fn parse_ambient_task_id(\n    run_id: &str,\n    error_prefix: &str,\n) -> anyhow::Result<AmbientAgentTaskId> {\n    run_id\n        .parse()\n        .map_err(|err| anyhow::anyhow!(\"{error_prefix} '{run_id}': {err}\"))\n}\n\npub(super) fn set_ambient_task_context_from_run_id(\n    ctx: &AppContext,\n    run_id: &str,\n) -> anyhow::Result<AmbientAgentTaskId> {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/common.rs#L53-L89","documentation":"The agent-mode model list was fetched successfully, but the requested `--model` id is not in it. The error enumerates the valid ids so the user can pick one. This is genuine input validation, not a server problem — contrast with the 'list unavailable' error for the retrieval-failed case.","triggerScenarios":"Passing `--model <id>` that is not contained in valid_ids when the list was available: typo, deprecated/removed model name, or a model not enabled for the account/workspace.","commonSituations":"Model renamed or removed server-side; enterprise workspaces with restricted model sets; copy-paste from outdated docs; case or whitespace mistakes in the id.","solutions":["Copy one of the ids from the error's suggestion list (or the models list command) and rerun","Check for the model's new name if it was renamed or deprecated","Ask your workspace admin to enable the model if access is restricted","Omit --model to use the default model"],"exampleFix":"# before\nwarp agent run --model gpt5-turbo ...\n# after (id taken from the suggested list)\nwarp agent run --model gpt-5-turbo ...","handlingStrategy":"validation","validationCode":"fn is_valid_model_id(id: &str, valid: &[LLMId]) -> bool {\n    valid.contains(&id.into())\n}\n// Fetch the live list and validate user input (offering suggestions) before submitting the run.","typeGuard":"fn known_model<'a>(id: &str, valid: &'a [LLMId]) -> Option<&'a LLMId> {\n    valid.iter().find(|m| m.to_string() == id)\n}","tryCatchPattern":null,"preventionTips":["Populate model pickers from the live list, never hardcoded values","Validate ids before starting long agent runs","Maintain a deprecated-to-current id mapping for renames"],"tags":["model-selection","validation","cli"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}