Hmbown/CodeWhale · error

This Codewhale account is configured for agent provider

Error message

This Codewhale account is configured for agent provider `{provider}`, which this CLI build does not know. Upgrade `codewhale`, or choose a supported provider in the Codewhale app.

What it means

The CLI reads the account's configured agent provider (`agent.model_provider`) and maps it via `parse_route_kind`. If the account is set to a provider identifier this build's route parser does not know, it throws this error advising an upgrade or a provider change in the Codewhale app.

Solutions

  1. Upgrade `codewhale` to the latest release so the new provider id is known.
  2. Choose a supported provider for the agent in the Codewhale web app, or run `codewhale account keys set <provider>`.
  3. Check `codewhale --version` against the latest release if the provider is newly announced.
Defensive patterns

Strategy: fallback

Validate before calling

// check the installed build knows the provider before syncing account config
if parse_route_kind(account.agent.model_provider).is_none() {
    eprintln!("upgrade codewhale or change the agent provider in the Codewhale app");
}

Prevention

When it happens

Trigger: The Codewhale account (synced from the app) has `agent.model_provider` set to a provider id that `parse_route_kind` cannot resolve in the installed CLI build.

Common situations: Older CLI version predating a newly added provider; account switched to a beta/renamed provider in the web app; stale build distributed before the provider shipped.

Related errors


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

Appendix: source

Thrown at crates/cli/src/cloud/machine.rs:1183

/// Map the account's configured provider identifier onto a local route.
///
/// `codewhale review` hard-errors when a model resolves to several configured
/// routes. When CI authenticates with a machine key the account has already
/// answered that question, so the account's own provider is the disambiguator
/// — no new flag, and no guess.
pub(crate) fn review_provider_from_agent(agent: &AgentState) -> Result<ProviderKind> {
    if !agent.configured {
        return Err(anyhow::Error::new(MachineError::new(
            409,
            "account_agent_model_unconfigured",
            "This Codewhale account has no agent model configured. Choose one in the Codewhale \
app, or run `codewhale account keys set <provider>`.",
            EXIT_AGENT_UNCONFIGURED,
        )));
    }
    let provider = agent.model_provider.trim();
    parse_route_kind(provider).ok_or_else(|| {
        anyhow!(
            "This Codewhale account is configured for agent provider `{}`, which this CLI build \
does not know. Upgrade `codewhale`, or choose a supported provider in the Codewhale app.",
            printable(provider)
        )
    })
}

#[cfg(test)]
mod tests;

View on GitHub (pinned to 73e0f67d83)