Hmbown/CodeWhale · error
This Codewhale account is configured for agent provider
Error message
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. What it means
The account configuration (fetched from the Codewhale account) names an agent model provider that the installed CLI build does not recognize: `parse_route_kind(agent.model_provider.trim())` returned `None`. The CLI refuses to proceed and asks the user to upgrade the CLI or change the provider in the Codewhale app.
Solutions
- Upgrade the CLI (`codewhale` update / reinstall latest) so `parse_route_kind` recognizes the provider.
- Open the Codewhale app and switch the agent provider to a supported one, or run `codewhale account keys set <provider>`.
- If the value should be valid, check for stray whitespace or casing in the account configuration.
Defensive patterns
Strategy: validation
Validate before calling
// keep the set of providers your CLI build supports in sync before switching accounts
let supported: Vec<&str> = /* providers known to parse_route_kind in this build */ vec![];
if !supported.contains(&agent.model_provider.trim()) {
eprintln!("account provider `{}` unsupported in this CLI build; upgrade codewhale", agent.model_provider);
} Prevention
- Pin an up-to-date CLI version in CI and upgrade before the Codewhale app adds new providers.
- Check the release notes for new provider support before switching your account's agent provider.
When it happens
Trigger: Running a command that resolves the account's agent configuration when `agent.model_provider` holds a provider slug unknown to this build's `parse_route_kind` (newer server-side provider, or a typo/manual edit of account config).
Common situations: The Codewhale app onboarded a new provider before your CLI version learned about it; an older pinned CLI in CI; the account was switched to a provider your build never shipped with.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Antigravity is a retired, non-runnable legacy provider…
- installed dsh is incompatible with this integration
- invalid value ' ' for '--provider ': expected one of …
- ` ` is not a valid provider id. Ids are 1-64 characters of…
- {LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE}
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/ec090c330644ceed.
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 433685b202)