zeroclaw-labs/zeroclaw · error · anyhow::Error
model_provider `{family}` has multiple configured aliases; u
Error message
model_provider `{family}` has multiple configured aliases; use one of: {list} What it means
The `/models <arg>` runtime switch resolves its argument via `resolve_models_command`: a dotted `family.alias` must exist in config, and a bare family name resolves only when it has exactly one configured alias under `[providers.models.<family>.*]`. When a family has two or more aliases, the bare name is ambiguous, so this error lists every qualified `family.alias` option for the user to pick from.
Source
Thrown at crates/zeroclaw-channels/src/orchestrator/mod.rs:1583
.collect();
aliases.sort();
match aliases.len() {
0 => ModelsCommandResolution::NoAlias(family),
1 => ModelsCommandResolution::Resolved(format!("{family}.{}", aliases[0])),
_ => ModelsCommandResolution::Ambiguous { family, aliases },
}
}
fn resolve_provider_ref_for_runtime_switch(config: &Config, raw: &str) -> anyhow::Result<String> {
match resolve_models_command(config, raw) {
ModelsCommandResolution::Resolved(provider_ref) => Ok(provider_ref),
ModelsCommandResolution::Ambiguous { family, aliases } => {
let list = aliases
.iter()
.map(|alias| format!("{family}.{alias}"))
.collect::<Vec<_>>()
.join(", ");
anyhow::bail!(
"model_provider `{family}` has multiple configured aliases; use one of: {list}"
)
}
ModelsCommandResolution::NoAlias(ref_or_family) => {
anyhow::bail!(
"model_provider `{ref_or_family}` does not resolve to a configured provider"
)
}
ModelsCommandResolution::Unknown => {
anyhow::bail!("unknown model_provider `{raw}`")
}
}
}
fn resolved_runtime_model_provider_ref(
config: &Config,
agent_alias: &str,
) -> anyhow::Result<String> {View on GitHub (pinned to 88bb9c8533)
Solutions
- Use a qualified ref from the listed options, e.g. `/models openai.personal`
- Or remove unneeded aliases so the family has exactly one configured entry
- List `[providers.models.<family>]` in the config to see current alias names
Example fix
# before /models openai # error: model_provider `openai` has multiple configured aliases; use one of: openai.personal, openai.work # after /models openai.personal
Defensive patterns
Strategy: validation
Validate before calling
fn qualified_models_ref(config: &Config, raw: &str) -> Option<String> {
let aliases: Vec<String> = config
.providers
.models
.aliases_of(raw.trim())
.map(ToString::to_string)
.collect();
match aliases.len() {
1 => Some(format!("{}.{}", raw.trim(), aliases[0])),
_ => None, // 0 or >1: require the user to pass family.alias explicitly
}
} Try / catch
if let Err(e) = runtime_switch(raw).await {
if e.to_string().contains("multiple configured aliases") {
// re-prompt with the family.alias options listed in the error message
}
} Prevention
- Autocomplete /models arguments from the configured family.alias pairs instead of free text
- Qualify with `family.alias` by default whenever a family has more than one alias
- After adding a new provider alias, update any scripts or playbooks that use bare family names
When it happens
Trigger: Sending `/models openai` in chat when the config defines multiple aliases for that family, e.g. `[providers.models.openai.work]` and `[providers.models.openai.personal]`.
Common situations: Multiple API keys or endpoints configured per family (work/personal, standard/proxy); a second alias added later breaks a bare `/models <family>` command that previously auto-resolved.
Related errors
- matrix: configure either `access_token` or `password`
- Nextcloud Talk: no bot secret configured (set bot_token or w
- Unsupported auth profile kind: {other}
- unknown provider family {family:?}
- {} model list failed at {url}: HTTP {status}
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/810d1a450ef78dd7.
Report an issue: GitHub.