Hmbown/CodeWhale · error
DS4 /v1/models at did not list configured alias ' '…
Error message
DS4 /v1/models at {} did not list configured alias '{configured_alias}' (advertised: {}) What it means
After successfully fetching `/v1/models`, `probe_ds4_models` verifies that the configured model alias appears in the endpoint's advertised model list. If none of the returned model ids equals `configured_alias`, the probe bails listing up to 8 advertised ids (or "none" if the list is empty). The endpoint is healthy but does not serve the configured model.
Solutions
- Compare the advertised model ids in the error message and correct the configured alias to one of them (exact match, including case).
- Confirm with `curl <endpoint>/v1/models` which models the endpoint actually serves.
- If the list is empty ("none"), check the DS4 server's model loading/registration — it may have no models loaded.
- Update the DS4 deployment or point the config at an endpoint that serves the intended alias.
Example fix
// config before model_alias = "deepseek-chat-v3" // after (matching an advertised id) model_alias = "deepseek-chat"
Defensive patterns
Strategy: validation
Validate before calling
// ensure the configured alias is served before dispatch
let models = list_ds4_models().await?;
assert!(models.iter().any(|m| m.id == configured_alias), "alias {} not served; available: {:?}", configured_alias, models.iter().map(|m| &m.id).collect::<Vec<_>>()); Prevention
- Copy model aliases exactly (case included) from the endpoint's /v1/models output.
- Re-check the alias after any DS4 deployment or model rename.
- Fail fast in scripts by listing models and matching the alias before long operations.
When it happens
Trigger: Doctor DS4 probe where the models list succeeds but `configured_alias` is absent — a typo in the configured alias, a renamed model, or an endpoint serving a different model catalog.
Common situations: Config written for a different DS4 deployment; upstream renamed or removed the model; alias case mismatch; endpoint returns an empty models list; pointing at a proxy that filters models.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- doctor configuration validation failed; see JSON output
- agent profile provider cannot be empty
- agent profile provider must be a simple provider id
- api_key cannot be empty string
- approval_policy ' ' is not allowed by requirements ( )
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/eb680f83952fd2f5.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/doctor.rs:592
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.active_route_base_url());
let status = error
.split_whitespace()
.collect::<Vec<_>>()
.windows(2)View on GitHub (pinned to 73e0f67d83)