{"record":{"id":"e7ac16cfc42722d2","repo":"zeroclaw-labs/zeroclaw","slug":"agents-agent-alias-model-provider-resolves-to-a","errorCode":null,"errorMessage":"agents.{agent_alias}.model_provider resolves to a model_provider entry with no `model` set. Configure [providers.models.{provider_name}.<alias>] model = \"...\".","messagePattern":"agents\\.(.+?)\\.model_provider resolves to a model_provider entry with no `model` set\\. Configure \\[providers\\.models\\.(.+?)\\.<alias>\\] model = \"\\.\\.\\.\"\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/agent/agent.rs","lineNumber":1714,"sourceCode":"            reaction_handle,\n            poll_handle,\n            escalate_handle,\n            channel_room_handle,\n            activated_handle,\n            // from_config performs no per-turn tool_filter_groups filtering\n            // itself, so mcp_tool_names is dropped here along with `registry`'s\n            // already-consumed sibling fields via `..`.\n            ..\n        } = assembled;\n        let tools = registry.into_inner();\n\n        let model_name = match agent_model_provider\n            .and_then(|e| e.model.as_deref())\n            .map(str::trim)\n            .filter(|m| !m.is_empty())\n        {\n            Some(m) => m.to_string(),\n            None => anyhow::bail!(\n                \"agents.{agent_alias}.model_provider resolves to a model_provider entry \\\n                 with no `model` set. Configure [providers.models.{provider_name}.<alias>] \\\n                 model = \\\"...\\\".\",\n            ),\n        };\n\n        let provider_ref = format!(\"{provider_name}.{provider_alias}\");\n        let provider_runtime_options = zeroclaw_providers::provider_runtime_options_for_alias(\n            config,\n            provider_name,\n            provider_alias,\n        );\n\n        let model_provider: Box<dyn ModelProvider> =\n            zeroclaw_providers::create_routed_model_provider_with_options(\n                config,\n                &provider_ref,\n                agent_model_provider.and_then(|e| e.api_key.as_deref()),","sourceCodeStart":1696,"sourceCodeEnd":1732,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/agent/agent.rs#L1696-L1732","documentation":"The agent's model_provider reference resolved to a real [providers.models.<type>.<alias>] entry, but that entry's model field is unset, empty, or whitespace-only (the value is trimmed and filtered before the check). ZeroClaw refuses to construct the agent with an indeterminate model — the message names the exact table to fix.","triggerScenarios":"A provider table created with api credentials but no model key; model = \"\" or model = \"   \" surviving a trim; a table stubbed out during setup and never completed.","commonSituations":"Provisioning provider auth first and intending to set the model later; copy-paste of a provider template that omits model; commented-out model line that was actually deleted.","solutions":["Add model = \"<model-id>\" under the named [providers.models.<type>.<alias>] table.","Remove surrounding whitespace from the model value — blank-after-trim is treated as unset.","Validate every resolved provider entry has a non-empty model at startup."],"exampleFix":"# before\n[providers.models.anthropic.default]\n# model key missing / left empty\nmodel = \"\"\n\n# after\n[providers.models.anthropic.default]\nmodel = \"claude-sonnet-4-5\"","handlingStrategy":"validation","validationCode":"// Startup lint: resolved entries must carry a model\nfor alias in config.agents.keys() {\n    if let Some((_p, _a, entry)) = config.resolved_model_provider_for_agent(alias) {\n        anyhow::ensure!(\n            entry.model.as_deref().map(str::trim).filter(|m| !m.is_empty()).is_some(),\n            \"provider entry for {alias} has no model\"\n        );\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Complete provider tables (key + model) in the same change","Treat whitespace-only model values as unset in linting","Cover the model-present invariant with a config schema test"],"tags":["config","agents","model-provider","missing-value","validation"],"backgroundTag":"missing-config-value","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}