BigPizzaV3/CodexPlusPlus · error · anyhow::Error

未找到可用的聚合供应商成员

Error message

未找到可用的聚合供应商成员

What it means

open_responses_proxy_request_with_settings_and_user_agent fans requests out to the members of an aggregate (relay_mode = Aggregate) provider. After exhausting retries/attempts without finding a usable relay member, it bails with this message indicating the aggregate provider has no requestable upstream members.

Solutions

  1. Open CodexPlusPlus settings and add at least one healthy member relay to the aggregate provider
  2. Re-enable or fix the disabled/failing member profiles (check base URL, API key, protocol)
  3. Check the diagnostic log entries emitted before the bail (candidateCount, attempt) to see why candidates were filtered
  4. Remove the aggregate provider or point the model at a direct relay if aggregation is not needed

Example fix

// settings.toml — before
[[relay_profiles]]
id = "agg"
relay_mode = "aggregate"
# no members
// after
[[relay_profiles]]
id = "agg"
relay_mode = "aggregate"
members = ["relay-a", "relay-b"]
Defensive patterns

Strategy: try-catch

Validate before calling

let members: Vec<_> = settings.relay_profiles.iter()
    .filter(|p| p.membership_of.as_deref() == Some(agg_id) && p.enabled)
    .collect();
if members.is_empty() { return Err(anyhow!("aggregate {agg_id} has no enabled members")); }

Try / catch

match open_responses_proxy_request_with_settings(...).await {
    Ok(resp) => resp,
    Err(e) if e.to_string().contains("未找到可用的聚合供应商成员") => fallback_to_direct_relay_or_503(e),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: A request routed to an aggregate provider finds zero eligible member relay profiles — all members are disabled, filtered out by model/protocol checks, or relay_count is 0 after candidate selection and the retry loop ends without success.

Common situations: User configured an aggregate provider but never added member relays; all members were disabled or deleted; every member failed health/auth validation so attempts were skipped; settings were partially migrated leaving an empty aggregate.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/684d1ba1a374d771. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/protocol_proxy.rs:771

                response: upstream,
            });
        }
        let _ = crate::diagnostic_log::append_diagnostic_log(
            "protocol_proxy.upstream_failover",
            json!({
                "relayId": relay.id,
                "relayName": relay.name,
                "endpoint": endpoint,
                "wireApi": wire_api,
                "stream": is_stream,
                "statusCode": status_code,
                "attempt": attempt + 1,
                "candidateCount": relay_count,
                "headerTimeoutSeconds": header_timeout.as_secs()
            }),
        );
    }
    anyhow::bail!("未找到可用的聚合供应商成员")
}

fn select_model_route(
    settings: &crate::settings::BackendSettings,
    model: &str,
) -> anyhow::Result<Option<ModelRouteSelection>> {
    if model.is_empty() || settings.active_aggregate_relay_profile().is_some() {
        return Ok(None);
    }

    let source = settings.active_relay_profile();
    let Some(route) = source
        .model_routes
        .iter()
        .find(|route| route.model.trim() == model)
    else {
        return Ok(None);
    };

View on GitHub (pinned to b1ed92e5e4)