{"record":{"id":"d2396a91a305bcfa","repo":"tinyhumansai/openhuman","slug":"chat-factory-configured-provider-for-role","errorCode":null,"errorMessage":"[chat-factory] configured provider '{}' for role '{}' did not produce a crate-native chat model","messagePattern":"\\[chat-factory\\] configured provider '(.+?)' for role '(.+?)' did not produce a crate-native chat model","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/inference/provider/factory.rs","lineNumber":1024,"sourceCode":"    }\n\n    // Preserve the legacy chokepoint's disclosure ordering for invalid custom\n    // routes: after both gates pass, the attempted external destination is\n    // visible even when configuration validation then fails.\n    emit_inference_egress(role, p);\n\n    if let Some((slug, model_with_temperature)) = p.split_once(':') {\n        if slug.trim().is_empty() {\n            return anyhow::anyhow!(\n                \"[chat-factory] provider string '{}' for role '{}' has an empty slug\",\n                p,\n                role\n            );\n        }\n        let (model, _) = split_model_and_temperature(model_with_temperature);\n        return match resolve_cloud_slug(role, slug.trim(), &model, config) {\n            Err(error) => error,\n            Ok(_) => anyhow::anyhow!(\n                \"[chat-factory] configured provider '{}' for role '{}' did not produce a crate-native chat model\",\n                p,\n                role\n            ),\n        };\n    }\n\n    anyhow::anyhow!(\n        \"[chat-factory] unrecognised provider string '{}' for role '{}'. \\\n         Valid forms: openhuman, ollama:<model>, lmstudio:<model>, mlx:<model>, omlx:<model>, \\\n         local-openai:<model>, claude_agent_sdk, claude_agent_sdk:<model>, <slug>:<model>. \\\n         Configured slugs: [{}]\",\n        p,\n        role,\n        config\n            .cloud_providers\n            .iter()\n            .map(|entry| entry.slug.as_str())","sourceCodeStart":1006,"sourceCodeEnd":1042,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/inference/provider/factory.rs#L1006-L1042","documentation":"A configured cloud-provider slug resolved successfully through resolve_cloud_slug but the resolution path produced no crate-native chat model object — an internal inconsistency between slug resolution and model construction. Distinct from an unrecognised slug: the slug was known, construction just yielded nothing.","triggerScenarios":"Thrown at src/openhuman/inference/provider/factory.rs:1024 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the cloud_providers entry's endpoint/model fields for malformed values","Verify the provider kind maps to a supported crate-native constructor","Report as a bug if the entry appears well-formed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}