{"record":{"id":"056ac8ac3dd3255f","repo":"openai/codex","slug":"failed-to-parse-model-catalog-json-path-as-js","errorCode":null,"errorMessage":"failed to parse model_catalog_json path `{}` as JSON: {err}","messagePattern":"failed to parse model_catalog_json path `(.+?)` as JSON: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/mod.rs","lineNumber":2015,"sourceCode":"    let _guard = AbsolutePathBufGuard::new(config_base_dir);\n    root_value\n        .try_into()\n        .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))\n}\n\n/// Validate user-visible feature settings against managed feature requirements.\npub fn validate_feature_requirements_for_config_toml(\n    cfg: &ConfigToml,\n    feature_requirements: Option<&Sourced<FeatureRequirementsToml>>,\n) -> std::io::Result<()> {\n    managed_features::validate_explicit_feature_settings_in_config_toml(cfg, feature_requirements)?;\n    managed_features::validate_feature_requirements_in_config_toml(cfg, feature_requirements)\n}\n\nfn load_catalog_json(path: &AbsolutePathBuf) -> std::io::Result<ModelsResponse> {\n    let file_contents = std::fs::read_to_string(path)?;\n    let catalog = serde_json::from_str::<ModelsResponse>(&file_contents).map_err(|err| {\n        std::io::Error::new(\n            ErrorKind::InvalidData,\n            format!(\n                \"failed to parse model_catalog_json path `{}` as JSON: {err}\",\n                path.display()\n            ),\n        )\n    })?;\n    if catalog.models.is_empty() {\n        return Err(std::io::Error::new(\n            ErrorKind::InvalidData,\n            format!(\n                \"model_catalog_json path `{}` must contain at least one model\",\n                path.display()\n            ),\n        ));\n    }\n    Ok(catalog)\n}","sourceCodeStart":1997,"sourceCodeEnd":2033,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/mod.rs#L1997-L2033","documentation":"Error \"failed to parse model_catalog_json path `{}` as JSON: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/config/mod.rs:2015 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix model_catalog_json so it parses as valid JSON."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}