BigPizzaV3/CodexPlusPlus · error

{message}

Error message

{message}

What it means

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.

Source

Thrown at crates/codex-plus-core/src/model_catalog.rs:593

        base_url: if profile.upstream_base_url.trim().is_empty() {
            profile.base_url.trim().to_string()
        } else {
            profile.upstream_base_url.trim().to_string()
        },
        api_key: profile.api_key.trim().to_string(),
    };
    if source.base_url.is_empty() {
        anyhow::bail!("Base URL 不能为空");
    }
    let endpoint = models_endpoint(&source.base_url);
    let client = crate::http_client::proxied_client(&profile.user_agent)?;
    let (models, status) = fetch_models_from_source(&client, &source).await;
    if models.is_empty() {
        let message = status
            .get("message")
            .and_then(Value::as_str)
            .unwrap_or("上游没有返回可用模型");
        anyhow::bail!("{message}");
    }
    Ok((models, endpoint))
}

fn preferred_responses_api_status(sources: &[Value]) -> Value {
    let statuses = sources
        .iter()
        .filter_map(|source| source.get("responses_api"))
        .collect::<Vec<_>>();
    for wanted in ["unsupported", "supported", "failed"] {
        if let Some(status) = statuses
            .iter()
            .find(|status| status.get("status").and_then(Value::as_str) == Some(wanted))
        {
            return (*status).clone();
        }
    }
    responses_api_status("unknown", "", "")

View on GitHub (pinned to f2074595a2)

Solutions

  1. 检查 Base URL 与 API Key 是否正确
  2. 确认上游 /models 端点可用且返回模型列表
  3. 检查代理与网络连通性后重试
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/codex-plus-core/src/model_catalog.rs:593 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/7954d202397c3985. Report an issue: GitHub.