{"record":{"id":"eb520cb0eb48946c","repo":"zeroclaw-labs/zeroclaw","slug":"agents-agent-alias-model-provider-is-empty-set-eb520c","errorCode":null,"errorMessage":"agents.{agent_alias}.model_provider is empty — set it to a configured \"<type>.<alias>\" (e.g. \"anthropic.{agent_alias}\")","messagePattern":"agents\\.(.+?)\\.model_provider is empty — set it to a configured \"<type>\\.<alias>\" \\(e\\.g\\. \"anthropic\\.(.+?)\"\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/agent/loop_.rs","lineNumber":2913,"sourceCode":"\n        let observer: Arc<dyn Observer> =\n            Arc::from(observability::create_observer(&config.observability));\n        let runtime: Arc<dyn platform::RuntimeAdapter> =\n            Arc::from(platform::create_runtime(&config.runtime)?);\n        let security = Arc::new(SecurityPolicy::for_agent(&config, agent_alias)?);\n        let (provider_name, provider_alias, agent_model_provider) = match config\n            .resolved_model_provider_for_agent(agent_alias)\n        {\n            Some(resolved) => (resolved.0, resolved.1.to_string(), Some(resolved.2.clone())),\n            None => {\n                let agent_ref = agent.model_provider.as_str();\n                if !agent_ref.is_empty() {\n                    anyhow::bail!(\n                        \"agents.{agent_alias}.model_provider = \\\"{agent_ref}\\\" does not resolve to \\\n                     a configured [providers.models.<type>.<alias>] entry\"\n                    );\n                }\n                anyhow::bail!(\n                    \"agents.{agent_alias}.model_provider is empty \\u{2014} set it to a configured \\\n                 \\\"<type>.<alias>\\\" (e.g. \\\"anthropic.{agent_alias}\\\")\"\n                );\n            }\n        };\n        let approval_manager = ApprovalManager::for_non_interactive(&risk_profile);\n        let mem: Arc<dyn Memory> = zeroclaw_memory::create_memory_for_agent(\n            &config,\n            agent_alias,\n            agent_model_provider\n                .as_ref()\n                .and_then(|e| e.api_key.as_deref()),\n        )\n        .await?;\n\n        let (composio_key, composio_entity_id) = if config.composio.enabled {\n            (\n                config.composio.api_key.as_deref(),","sourceCodeStart":2895,"sourceCodeEnd":2931,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/agent/loop_.rs#L2895-L2931","documentation":"The process_message twin of the empty model_provider error: on a non-interactive turn, the agent's model_provider is an empty string, which the V3 schema treats as a config error rather than falling back to a default provider. Every agent must name its provider explicitly.","triggerScenarios":"A channel/cron/gateway turn hits an agent whose model_provider was never set or was blanked by a config edit; provisioning generated an agent table with an empty field.","commonSituations":"Adding agents for channel handlers without wiring model_provider; config overlays clearing the field; migrating older configs where the field was optional.","solutions":["Set model_provider = \"<type>.<alias>\" on the failing agent (e.g. \"anthropic.default\").","Confirm the referenced provider table exists and sets a model.","Lint all agent tables for non-empty model_provider before reload."],"exampleFix":"# before\n[agents.telegram-bot]\nmodel_provider = \"\"\n\n# after\n[agents.telegram-bot]\nmodel_provider = \"anthropic.default\"","handlingStrategy":"validation","validationCode":"// Lint every agent table before enabling channels/cron\nfor (alias, agent) in &config.agents {\n    anyhow::ensure!(\n        !agent.model_provider.as_str().trim().is_empty(),\n        \"agents.{alias}.model_provider is empty\"\n    );\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Wire model_provider when adding channel-handler agents","Provisioning templates must fail if the field is unfilled","Lint config overlays that clear fields"],"tags":["config","agents","model-provider","missing-value","gateway"],"backgroundTag":"missing-config-value","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}