{"record":{"id":"7954d202397c3985","repo":"BigPizzaV3/CodexPlusPlus","slug":"message","errorCode":null,"errorMessage":"{message}","messagePattern":"\\{message\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/model_catalog.rs","lineNumber":593,"sourceCode":"        base_url: if profile.upstream_base_url.trim().is_empty() {\n            profile.base_url.trim().to_string()\n        } else {\n            profile.upstream_base_url.trim().to_string()\n        },\n        api_key: profile.api_key.trim().to_string(),\n    };\n    if source.base_url.is_empty() {\n        anyhow::bail!(\"Base URL 不能为空\");\n    }\n    let endpoint = models_endpoint(&source.base_url);\n    let client = crate::http_client::proxied_client(&profile.user_agent)?;\n    let (models, status) = fetch_models_from_source(&client, &source).await;\n    if models.is_empty() {\n        let message = status\n            .get(\"message\")\n            .and_then(Value::as_str)\n            .unwrap_or(\"上游没有返回可用模型\");\n        anyhow::bail!(\"{message}\");\n    }\n    Ok((models, endpoint))\n}\n\nfn preferred_responses_api_status(sources: &[Value]) -> Value {\n    let statuses = sources\n        .iter()\n        .filter_map(|source| source.get(\"responses_api\"))\n        .collect::<Vec<_>>();\n    for wanted in [\"unsupported\", \"supported\", \"failed\"] {\n        if let Some(status) = statuses\n            .iter()\n            .find(|status| status.get(\"status\").and_then(Value::as_str) == Some(wanted))\n        {\n            return (*status).clone();\n        }\n    }\n    responses_api_status(\"unknown\", \"\", \"\")","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/model_catalog.rs#L575-L611","documentation":"Thrown by fetch_relay_profile_model_ids when fetch_models_from_source returned zero models: the code formats an upstream-derived {message} (built from the HTTP status/error) and bails with it. The offending input is the relay profile's /models endpoint response — either the request failed or returned an empty model list; the wrapper message preserves the upstream detail for display.","triggerScenarios":"Thrown at crates/codex-plus-core/src/model_catalog.rs:593 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["检查 Base URL 与 API Key 是否正确","确认上游 /models 端点可用且返回模型列表","检查代理与网络连通性后重试"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}