Hmbown/CodeWhale · error · anyhow::Error
model `{model}` is available from configured provider route(
Error message
model `{model}` is available from configured provider route(s): {providers}. Pass `--provider <provider>` with `--model {model}` to choose one explicitly. In the TUI, use `/provider`, `/model`, or `/setup` to resolve the route before sending. What it means
Before a one-shot run with an explicit --model, the router computes which configured providers can serve that model (explicit_route_candidate_providers); if the active provider is not among them, it refuses instead of sending a request that would fail upstream. The message lists the candidate routes and names both remedies: --provider on the CLI, /provider //model //setup in the TUI.
Source
Thrown at crates/tui/src/lib.rs:10070
);
return Ok(CliAutoRoute {
provider: selection.provider,
model: selection.model,
reasoning_effort: selection.reasoning_effort,
auto_controls_reasoning,
auto_model: false,
});
}
let candidate_providers = model_routing::explicit_route_candidate_providers(config, model);
if !candidate_providers.is_empty() && !candidate_providers.contains(&config.api_provider())
{
let providers = candidate_providers
.iter()
.map(|provider| provider.as_str())
.collect::<Vec<_>>()
.join(", ");
bail!(
"model `{model}` is available from configured provider route(s): {providers}. \
Pass `--provider <provider>` with `--model {model}` to choose one explicitly. \
In the TUI, use `/provider`, `/model`, or `/setup` to resolve the route before sending."
);
}
// When --model is not `auto`, fall back to the reasoning_effort
// declared in the user's config.toml. The previous hard-coded `None`
// silently dropped the user's setting on every non-auto-route exec
// call, which (for example) prevented vllm + Qwen3 users from
// disabling thinking via `reasoning_effort = "off"` and caused
// 30+ second SSE idle timeouts on trivial prompts.
let reasoning_effort = config
.reasoning_effort()
.map(crate::tui::app::ReasoningEffort::from_setting);
Ok(CliAutoRoute {
provider: config.api_provider(),
model: model.to_string(),View on GitHub (pinned to 0c42157ee5)
Solutions
- Pass `--provider <one-of-the-listed>` together with --model
- Or switch to a --model your current provider serves
- In the TUI, resolve the route via /provider, /model, or /setup
- Align the route config so your default provider serves the models you use daily
Example fix
# before codewhale --model some-model -p "hi" # model `some-model` is available from configured provider route(s): openrouter, ... # after codewhale --provider openrouter --model some-model -p "hi"
Defensive patterns
Strategy: validation
Validate before calling
# in automation, always pin the provider when pinning the model codewhale --provider "$PROVIDER" --model "$MODEL" ... # both or neither
Prevention
- Pass --provider and --model together in scripted one-shot runs
- Keep the route config small so model ids map to exactly one provider
- After switching the default provider, re-check that your usual --model values still route
When it happens
Trigger: Passing --model X when X is routed only through other configured providers -- e.g., the model id is served by an openrouter/custom route while the current api_provider points elsewhere.
Common situations: The same model id available from several providers; the default provider was switched in config while old --model habits remained; commands copied from a teammate whose route config differs.
Related errors
- max_chars must be > 0
- context_window must be greater than 0
- custom provider '{provider_id}' must set [providers.{provide
- {name}.context_window must be greater than 0
- Invalid provider '{provider}': expected {}.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/cdafd8782ca7188e.
Report an issue: GitHub.