Hmbown/CodeWhale · error

selected Fleet ' ' operator route / is invalid

Error message

selected Fleet '{}' operator route {}/{} is invalid: {}

What it means

Thrown when the Fleet operator's provider identity resolves but `resolve_runtime_route_for_identity` rejects the provider/model pair, so no valid runtime route exists for the operator's requested model. The error from the route resolver is sanitized and appended.

Solutions

  1. Update the fleet's operator model id to one currently offered by the provider.
  2. Verify the model id spelling and that the provider config exposes it.
  3. Run /fleet and re-select or re-author the fleet with a valid route.
  4. Check release notes for model deprecations if this fleet worked previously.
Defensive patterns

Strategy: validation

Validate before calling

// confirm the pinned model is offered by the provider before selecting the fleet
let model_ok = config.providers.iter()
    .filter(|p| p.id == fleet.operator.provider)
    .any(|p| p.models.iter().any(|m| m.id == fleet.operator.model));

Prevention

When it happens

Trigger: A turn starts with a selected Fleet whose operator route pins `provider/model` where the model is not offered by that provider, the model id is misspelled or deprecated, or route resolution fails for that identity.

Common situations: Model renamed or removed by the provider after the fleet was authored; typo in the model id; config profile lacks the model mapping the fleet expects; provider capability changes between versions.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/edcd66c0173aca78. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/lib.rs:8344

        );
    }
    let safe_provider_id = crate::safe_label::SafeLabel::identifier(provider_id);
    let safe_model_id = crate::safe_label::SafeLabel::catalog_model(model_id);

    let identity = config
        .resolve_provider_pin_identity(provider_id)
        .map_err(|error| {
            anyhow!(
                "selected Fleet '{}' operator provider '{}' is unavailable: {}",
                fleet_name,
                safe_provider_id,
                crate::safe_label::safe_error_text(&error)
            )
        })?;
    let resolved =
        crate::route_runtime::resolve_runtime_route_for_identity(config, &identity, Some(model_id))
            .map_err(|error| {
                anyhow!(
                    "selected Fleet '{}' operator route {}/{} is invalid: {}",
                    fleet_name,
                    safe_provider_id,
                    safe_model_id,
                    crate::safe_label::safe_error_text(&error)
                )
            })?;
    let mut selected_config = *resolved.config;
    selected_config.fleet_operator_route_applied = true;
    selected_config.fleet_operator_reasoning_applied = false;
    if !explicit_reasoning_override
        && let Some(reasoning) = operator
            .reasoning
            .as_deref()
            .map(str::trim)
            .filter(|reasoning| !reasoning.is_empty())
        && let Some(reasoning) = normalize_cli_reasoning_effort(reasoning).map_err(|error| {
            anyhow!(

View on GitHub (pinned to 73e0f67d83)