{"record":{"id":"d302ae54767c70b3","repo":"Hmbown/CodeWhale","slug":"invalid-provider-models-provider-id-value-err","errorCode":null,"errorMessage":"invalid provider_models.{provider_id} value: {err}","messagePattern":"invalid provider_models\\.(.+?) value: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config_ui.rs","lineNumber":835,"sourceCode":"    let document_identity = config\n        .resolve_provider_identity(&doc.runtime.provider)\n        .map_err(anyhow::Error::msg)?;\n    if document_identity.provider != app.api_provider\n        || document_identity.key != app.provider_identity_for_persistence()\n    {\n        bail!(\n            \"provider changed from '{}' to '{}' while editing; switch providers with /provider, then reopen /config\",\n            app.provider_identity_for_persistence(),\n            doc.runtime.provider\n        );\n    }\n    validate_and_normalize_model(config, app.api_provider, &doc.runtime.model)?;\n    for (provider_id, model) in &doc.settings.provider_models {\n        let identity = config\n            .resolve_provider_identity(provider_id)\n            .map_err(anyhow::Error::msg)?;\n        validate_and_normalize_model(config, identity.provider, model)\n            .map_err(|err| anyhow::anyhow!(\"invalid provider_models.{provider_id} value: {err}\"))?;\n    }\n    if doc.config.mcp_config_path.trim().is_empty() {\n        bail!(\"mcp_config_path cannot be empty\");\n    }\n    let _ = theme_setting_for_document(doc)?;\n    Ok(())\n}\n\nfn theme_setting_for_document(doc: &ConfigUiDocument) -> Result<String> {\n    let setting = if doc.settings.theme == UiThemeValue::Custom {\n        let name = doc\n            .settings\n            .custom_theme_name\n            .as_deref()\n            .map(str::trim)\n            .filter(|name| !name.is_empty())\n            .ok_or_else(|| anyhow::anyhow!(\"custom theme requires custom_theme_name\"))?;\n        format!(\"{}{}\", crate::palette::USER_THEME_PREFIX, name)","sourceCodeStart":817,"sourceCodeEnd":853,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config_ui.rs#L817-L853","documentation":"Error \"invalid provider_models.{provider_id} value: {err}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config_ui.rs:835 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}