warpdotdev/warp · error · anyhow::Error

Unknown model id '{model_id}'. Try one of: {suggestions}

Error message

Unknown model id '{model_id}'. Try one of: {suggestions}

What it means

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.

Source

Thrown at app/src/ai/agent_sdk/common.rs:71

    model_id: &str,
    valid_ids: &[LLMId],
    list_unavailable: bool,
) -> anyhow::Result<LLMId> {
    let llm_id: LLMId = model_id.into();
    if valid_ids.contains(&llm_id) {
        Ok(llm_id)
    } else if list_unavailable {
        Err(anyhow::anyhow!(
            "Could not retrieve the agent-mode model list from the server \
             (the request failed or returned no models). Try again later."
        ))
    } else {
        let suggestions = valid_ids
            .iter()
            .map(|id| id.to_string())
            .collect::<Vec<_>>()
            .join(", ");
        Err(anyhow::anyhow!(
            "Unknown model id '{model_id}'. Try one of: {suggestions}"
        ))
    }
}

pub(super) fn parse_ambient_task_id(
    run_id: &str,
    error_prefix: &str,
) -> anyhow::Result<AmbientAgentTaskId> {
    run_id
        .parse()
        .map_err(|err| anyhow::anyhow!("{error_prefix} '{run_id}': {err}"))
}

pub(super) fn set_ambient_task_context_from_run_id(
    ctx: &AppContext,
    run_id: &str,
) -> anyhow::Result<AmbientAgentTaskId> {

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Copy one of the ids from the error's suggestion list (or the models list command) and rerun
  2. Check for the model's new name if it was renamed or deprecated
  3. Ask your workspace admin to enable the model if access is restricted
  4. Omit --model to use the default model

Example fix

# before
warp agent run --model gpt5-turbo ...
# after (id taken from the suggested list)
warp agent run --model gpt-5-turbo ...
Defensive patterns

Strategy: validation

Validate before calling

fn is_valid_model_id(id: &str, valid: &[LLMId]) -> bool {
    valid.contains(&id.into())
}
// Fetch the live list and validate user input (offering suggestions) before submitting the run.

Type guard

fn known_model<'a>(id: &str, valid: &'a [LLMId]) -> Option<&'a LLMId> {
    valid.iter().find(|m| m.to_string() == id)
}

Prevention

When it happens

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

Common situations: Model renamed or removed server-side; enterprise workspaces with restricted model sets; copy-paste from outdated docs; case or whitespace mistakes in the id.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/dc9538d77b62c610. Report an issue: GitHub.