{"record":{"id":"eb680f83952fd2f5","repo":"Hmbown/CodeWhale","slug":"ds4-v1-models-at-did-not-list-configured-alias","errorCode":null,"errorMessage":"DS4 /v1/models at {} did not list configured alias '{configured_alias}' (advertised: {})","messagePattern":"DS4 /v1/models at (.+?) did not list configured alias '(.+?)' \\(advertised: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/doctor.rs","lineNumber":592,"sourceCode":"        client.list_models(),\n    )\n    .await\n    {\n        Ok(Ok(models)) => models,\n        Ok(Err(error)) => anyhow::bail!(ds4_probe_error(config, &error.to_string())),\n        Err(_) => anyhow::bail!(\"DS4 /v1/models timed out after 15 seconds at {}\", endpoint),\n    };\n    if !models\n        .iter()\n        .any(|available| available.id == configured_alias)\n    {\n        let advertised = models\n            .iter()\n            .take(8)\n            .map(|available| available.id.as_str())\n            .collect::<Vec<_>>()\n            .join(\", \");\n        anyhow::bail!(\n            \"DS4 /v1/models at {} did not list configured alias '{configured_alias}' (advertised: {})\",\n            endpoint,\n            if advertised.is_empty() {\n                \"none\"\n            } else {\n                advertised.as_str()\n            }\n        );\n    }\n    Ok(())\n}\n\nfn ds4_probe_error(config: &crate::config::Config, error: &str) -> String {\n    let endpoint = crate::client::redact_url_for_display(&config.active_route_base_url());\n    let status = error\n        .split_whitespace()\n        .collect::<Vec<_>>()\n        .windows(2)","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/doctor.rs#L574-L610","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// config before\nmodel_alias = \"deepseek-chat-v3\"\n// after (matching an advertised id)\nmodel_alias = \"deepseek-chat\"","handlingStrategy":"validation","validationCode":"// ensure the configured alias is served before dispatch\nlet models = list_ds4_models().await?;\nassert!(models.iter().any(|m| m.id == configured_alias), \"alias {} not served; available: {:?}\", configured_alias, models.iter().map(|m| &m.id).collect::<Vec<_>>());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["ds4","config","model-alias","doctor","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}