{"record":{"id":"8e8736848554437f","repo":"tinyhumansai/openhuman","slug":"chat-factory-provider-string-for-role","errorCode":null,"errorMessage":"[chat-factory] provider string '{}' for role '{}' has an empty slug","messagePattern":"\\[chat-factory\\] provider string '(.+?)' for role '(.+?)' has an empty slug","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/inference/provider/factory.rs","lineNumber":1015,"sourceCode":"            role,\n            &resolve_primary_cloud_provider_string(config),\n            config,\n        );\n    }\n\n    #[cfg(not(test))]\n    if let Err(error) = verify_session_active(config) {\n        return error;\n    }\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 '{}'. \\","sourceCodeStart":997,"sourceCodeEnd":1033,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/inference/provider/factory.rs#L997-L1033","documentation":"The configured provider string for a role contains a colon but an empty slug before it (e.g. \":gpt-4\"). Guard on the split provider string before slug resolution; the message identifies the malformed string and role so the config typo is obvious.","triggerScenarios":"Thrown at src/openhuman/inference/provider/factory.rs:1015 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the provider string to start with a valid slug (e.g. ollama:<model>, <slug>:<model>)"],"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"}