Hmbown/CodeWhale · error

DS4 /v1/models at {} did not list configured alias '{configu

Error message

DS4 /v1/models at {} did not list configured alias '{configured_alias}' (advertised: {})

What it means

The DS4 probe listed models successfully, but no advertised id equals `configured_alias` (the model set on the DeepSeek client). The message includes up to 8 advertised ids, or 'none' for an empty catalog, so the alias/server mismatch is visible immediately (doctor.rs:423).

Source

Thrown at crates/tui/src/doctor.rs:423

        client.list_models(),
    )
    .await
    {
        Ok(Ok(models)) => models,
        Ok(Err(error)) => anyhow::bail!(ds4_probe_error(config, &error.to_string())),
        Err(_) => anyhow::bail!("DS4 /v1/models timed out after 15 seconds at {}", endpoint),
    };
    if !models
        .iter()
        .any(|available| available.id == configured_alias)
    {
        let advertised = models
            .iter()
            .take(8)
            .map(|available| available.id.as_str())
            .collect::<Vec<_>>()
            .join(", ");
        anyhow::bail!(
            "DS4 /v1/models at {} did not list configured alias '{configured_alias}' (advertised: {})",
            endpoint,
            if advertised.is_empty() {
                "none"
            } else {
                advertised.as_str()
            }
        );
    }
    Ok(())
}

fn ds4_probe_error(config: &crate::config::Config, error: &str) -> String {
    let endpoint = crate::client::redact_url_for_display(&config.deepseek_base_url());
    let status = error
        .split_whitespace()
        .collect::<Vec<_>>()
        .windows(2)

View on GitHub (pinned to 8880682c63)

Solutions

  1. Set the configured DeepSeek model alias to one of the advertised ids shown in the message
  2. Or reconfigure/restart ds4-server so it advertises the configured alias
  3. Re-run the doctor to confirm the alias now resolves

Example fix

# before (config)
model = "deepseek-chat"
# after (pick an id the message says is advertised)
model = "ds4-chat-v2"
Defensive patterns

Strategy: validation

Validate before calling

let models = client.list_models().await?;
let alias = client.model().to_string();
anyhow::ensure!(
    models.iter().any(|m| m.id == alias),
    "alias {alias} is not advertised; pick one of: {}",
    models.iter().map(|m| m.id.as_str()).collect::<Vec<_>>().join(", ")
);

Type guard

fn alias_advertised(models: &[DeepSeekModel], alias: &str) -> bool {
    models.iter().any(|m| m.id == alias)
}

Prevention

When it happens

Trigger: Config sets an alias like `deepseek-chat` while ds4-server advertises different ids; the server's model catalog changed after config was written; alias casing differs from the advertised id; server returns an empty model list.

Common situations: ds4-server upgrade renames models; config copied from another environment; typo in the model setting.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/eb680f83952fd2f5. Report an issue: GitHub.