{"record":{"id":"6395c9e4f49e1124","repo":"zeroclaw-labs/zeroclaw","slug":"unknown-model-provider-raw","errorCode":null,"errorMessage":"unknown model_provider `{raw}`","messagePattern":"unknown model_provider `(.+?)`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":1593,"sourceCode":"    match resolve_models_command(config, raw) {\n        ModelsCommandResolution::Resolved(provider_ref) => Ok(provider_ref),\n        ModelsCommandResolution::Ambiguous { family, aliases } => {\n            let list = aliases\n                .iter()\n                .map(|alias| format!(\"{family}.{alias}\"))\n                .collect::<Vec<_>>()\n                .join(\", \");\n            anyhow::bail!(\n                \"model_provider `{family}` has multiple configured aliases; use one of: {list}\"\n            )\n        }\n        ModelsCommandResolution::NoAlias(ref_or_family) => {\n            anyhow::bail!(\n                \"model_provider `{ref_or_family}` does not resolve to a configured provider\"\n            )\n        }\n        ModelsCommandResolution::Unknown => {\n            anyhow::bail!(\"unknown model_provider `{raw}`\")\n        }\n    }\n}\n\nfn resolved_runtime_model_provider_ref(\n    config: &Config,\n    agent_alias: &str,\n) -> anyhow::Result<String> {\n    let agent = config\n        .agents\n        .get(agent_alias)\n        .with_context(|| format!(\"agents.{agent_alias} is not configured\"))?;\n    let configured = agent.model_provider.trim();\n    if configured.is_empty() {\n        anyhow::bail!(\n            \"agents.{agent_alias}.model_provider is empty; runtime reload requires a dotted `<type>.<alias>` provider reference\"\n        );\n    }","sourceCodeStart":1575,"sourceCodeEnd":1611,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L1575-L1611","documentation":"Thrown while resolving a `/models` runtime switch argument (resolve_provider_ref_for_runtime_switch). `ModelsCommandResolution::Unknown` means `canonical_model_provider_name()` found no match (case-insensitive) for the trimmed argument in `zeroclaw_providers::list_model_providers()` — the argument does not name any provider family the binary knows about, and it was not a dotted ref that resolved. It is the strictest of the resolution failures: the name itself is unrecognized.","triggerScenarios":"Sending `/models <name>` where `<name>` is not any known provider family, e.g. `/models gpt4`, `/models my-custom-llm`, or a misspelled family like `/models openaai`. Dotted refs whose family segment is unknown also land here only when the whole string fails the family match; otherwise NoAlias (error 160) applies.","commonSituations":"User passes a model name instead of a provider name (`/models claude-3` instead of `/models anthropic`); typo in the provider family; expecting a custom provider registered in code to appear in the built-in list; stale docs naming a provider that the current binary version does not ship.","solutions":["List the provider families the binary supports by checking `zeroclaw_providers::list_model_providers()` output (e.g. `zeroclaw models list` or the providers docs) and use one of those names","Fix typos and remember family matching is against provider names, not model names","If you meant a specific model, first switch to the family (`/models openai`) and set the model through that provider's own configuration"],"exampleFix":"# before\n/models gpt-4o   # model name, not a provider\n# error: unknown model_provider `gpt-4o`\n\n# after\n/models openai   # family name from list_model_providers()","handlingStrategy":"validation","validationCode":"// Mirror the family check before issuing /models:\nfn is_known_family(name: &str) -> bool {\n    zeroclaw_providers::list_model_providers()\n        .iter()\n        .any(|p| p.name.eq_ignore_ascii_case(name.trim()))\n}\nif !is_known_family(arg) && !arg.contains('.') {\n    notify_user(\"unknown provider family; run `zeroclaw models list`\");\n}","typeGuard":null,"tryCatchPattern":"Err(err) if err.to_string().starts_with(\"unknown model_provider\") => {\n    // surface the known family list to the chat user\n}","preventionTips":["Document that /models takes provider family names, not model names","Cache the supported family list from list_model_providers() and validate chat input against it","Add autocomplete for /models in your bot frontend using that same list"],"tags":["model-provider","invalid-argument","runtime-switch","zeroclaw"],"backgroundTag":"unknown-provider-name","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}