{"record":{"id":"d2667efb3c60b5b1","repo":"zeroclaw-labs/zeroclaw","slug":"model-route-has-empty-model","errorCode":null,"errorMessage":"model route \"{}\" has empty model","messagePattern":"model route \"(.+?)\" has empty model","errorType":"console","errorClass":"DiagItem","httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-runtime/src/doctor/mod.rs","lineNumber":1257,"sourceCode":"        items.push(DiagItem::error(cat, \"gateway port is 0 (invalid)\"));\n    }\n\n    // Model routes validation\n    for route in &config.model_routes {\n        if route.hint.is_empty() {\n            items.push(DiagItem::warn(cat, \"model route with empty hint\"));\n        }\n        if let Some(reason) = provider_validation_error(config, &route.model_provider) {\n            items.push(DiagItem::warn(\n                cat,\n                format!(\n                    \"model route \\\"{}\\\" uses invalid model_provider \\\"{}\\\": {}\",\n                    route.hint, route.model_provider, reason\n                ),\n            ));\n        }\n        if route.model.is_empty() {\n            items.push(DiagItem::warn(\n                cat,\n                format!(\"model route \\\"{}\\\" has empty model\", route.hint),\n            ));\n        }\n    }\n\n    // Embedding routes validation\n    for route in &config.embedding_routes {\n        if route.hint.trim().is_empty() {\n            items.push(DiagItem::warn(cat, \"embedding route with empty hint\"));\n        }\n        if let Some(reason) = embedding_provider_validation_error(&route.model_provider) {\n            items.push(DiagItem::warn(\n                cat,\n                format!(\n                    \"embedding route \\\"{}\\\" uses invalid model_provider \\\"{}\\\": {}\",\n                    route.hint, route.model_provider, reason\n                ),","sourceCodeStart":1239,"sourceCodeEnd":1275,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/doctor/mod.rs#L1239-L1275","documentation":"check_config_semantics flags a model route whose `model` field is empty. Even when the route's provider resolves, an empty model leaves the route unable to produce a usable model name, so any request it matches will fail downstream.","triggerScenarios":"A `[[model_routes]]` entry with `model = \"\"` or the field missing; doctor prints `model route \"<hint>\" has empty model`.","commonSituations":"Routes sketched with hint/provider first and the model never filled in; fields lost during config merges.","solutions":["Set the route's `model` to a concrete model name","Remove the route if it is unused","Re-run `zeroclaw doctor` to confirm no route warnings remain"],"exampleFix":"# before\n[[model_routes]]\nhint = \"cheap\"\nmodel = \"\"\n\n# after\n[[model_routes]]\nhint = \"cheap\"\nmodel = \"gpt-4o-mini\"","handlingStrategy":"validation","validationCode":"fn validate_model_routes(cfg: &Config) -> Vec<String> {\n    cfg.model_routes\n        .iter()\n        .filter(|r| r.model.is_empty())\n        .map(|r| format!(\"route '{}' has empty model\", r.hint))\n        .collect()\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat route definitions as complete units: hint, model, and valid provider together","Lint config for empty string fields before shipping"],"tags":["zeroclaw","doctor","config","model-routes","model"],"backgroundTag":"model-route-misconfigured","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}