Hmbown/CodeWhale · warning · anyhow::Error
Auto has no concrete route yet; send a turn before warming i
Error message
Auto has no concrete route yet; send a turn before warming its cache
What it means
Cache warming replays the concrete provider/model route behind the 'Auto' selector. That route (last_effective_provider / last_effective_model) exists only after a completed turn; on a fresh conversation, or one restored without endpoint truth, cache_replay_target() returns None and resolve_cache_replay_route bails with this guidance message. A sibling bail covers a saved identity that now resolves to a different provider/key.
Source
Thrown at crates/tui/src/tui/ui/provider_routes.rs:239
}
pub(crate) async fn fetch_available_models(config: &Config) -> Result<Vec<String>> {
use crate::client::DeepSeekClient;
let client = DeepSeekClient::new(config)?;
let models = tokio::time::timeout(Duration::from_secs(20), client.list_models()).await??;
let mut ids = models.into_iter().map(|model| model.id).collect::<Vec<_>>();
ids.sort();
ids.dedup();
Ok(ids)
}
pub(crate) fn resolve_cache_replay_route(
app: &App,
config: &Config,
) -> Result<crate::route_runtime::ResolvedRuntimeRoute> {
let target = app.cache_replay_target().ok_or_else(|| {
anyhow::anyhow!("Auto has no concrete route yet; send a turn before warming its cache")
})?;
let identity = config
.resolve_persisted_provider_identity(
Some(target.provider.as_str()),
target.provider_id.as_deref(),
)
.map_err(anyhow::Error::msg)?;
if identity.provider != target.provider || identity.key != target.provider_identity {
anyhow::bail!(
"saved cache route identity `{}` now resolves as {}/{} instead of {}/{}; send a new turn before warming",
target.provider_identity,
identity.provider.as_str(),
identity.key,
target.provider.as_str(),
target.provider_identity
);
}
let route = resolve_runtime_route_for_identity(config, &identity, Some(&target.model))View on GitHub (pinned to 0c42157ee5)
Solutions
- Send one message/turn so Auto resolves a concrete provider and model, then warm the cache
- If it still fails after a turn, check that provider/key config has not drifted from the saved route identity (the sibling error names the mismatch)
- Switch from Auto to an explicit provider/model so the active route is authoritative immediately
Defensive patterns
Strategy: validation
Validate before calling
// Rust - only offer cache warming once a concrete route exists
if app.cache_replay_target().is_none() {
disable_warm_cache_action(); // Auto has no concrete route yet
return;
} Try / catch
let target = app.cache_replay_target()
.ok_or_else(|| anyhow::anyhow!("Auto has no concrete route yet; send a turn before warming its cache"))?;
// resolve identity and warm; surface the guidance message verbatim to the user Prevention
- Send at least one turn on Auto before warming its cache
- Gate the warm action on cache_replay_target() being Some
- After provider/key config changes, complete a new turn so the route identity refreshes
When it happens
Trigger: Invoking the cache-warm action while the model selector is Auto and no turn has completed: right after launch, after /new, or in a restored session that retained provider/model but no endpoint.
Common situations: Users pressing warm-cache first thing in a session; restored Auto sessions whose endpoint was not captured.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/ae096bed3013f529.
Report an issue: GitHub.