{"record":{"id":"63a842bde69349e1","repo":"Hmbown/CodeWhale","slug":"fleet-task-pins-model-with-source-s","errorCode":null,"errorMessage":"Fleet task `{}` pins model `{}` with {} (source={source}), but that route does not resolve to a real model on any configured provider, so the worker cannot launch. The runtime never infers a provider from a model's spelling — set an explicit provider for this model in the profile, or switch the role to `inherit`.","messagePattern":"Fleet task `(.+?)` pins model `(.+?)` with (.+?) \\(source=(.+?)\\), but that route does not resolve to a real model on any configured provider, so the worker cannot launch\\. The runtime never infers a provider from a model's spelling — set an explicit provider for this model in the profile, or switch the role to `inherit`\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/worker_runtime.rs","lineNumber":113,"sourceCode":"\n        let route = resolve_fleet_route_with_config(task, agent_profiles, session_model, config);\n        if route.is_some() {\n            validate_fleet_reasoning_effort(task, agent_profiles, session_model, config)?;\n        }\n        if !pinned_model {\n            continue;\n        }\n        // A concrete model is pinned at the task/profile level; it must resolve\n        // to a real provider route or the worker cannot launch.\n        if route.is_some() {\n            continue;\n        }\n        let provider = explicit_provider\n            .map(|provider| format!(\"provider=`{provider}`\"))\n            .unwrap_or_else(|| {\n                \"no explicit provider (resolves against the session/default provider)\".to_string()\n            });\n        bail!(\n            \"Fleet task `{}` pins model `{}` with {} (source={source}), but that route does not \\\n             resolve to a real model on any configured provider, so the worker cannot launch. \\\n             The runtime never infers a provider from a model's spelling — set an explicit \\\n             provider for this model in the profile, or switch the role to `inherit`.\",\n            task.id,\n            model,\n            provider\n        );\n    }\n    Ok(())\n}\n\n/// Reject an explicit Fleet thinking tier when the exact resolved route does\n/// not advertise reasoning support. `inherit`, `auto`, and `off` are valid on\n/// every route because they do not force a reasoning payload. This check is\n/// deliberately performed at run creation, after the same route resolver used\n/// for launch, so the UI cannot save a profile that will silently downgrade or\n/// fail at spawn time (#4866).","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/fleet/worker_runtime.rs#L95-L131","documentation":"The task pins a concrete model, but route resolution found no real model matching it on any configured provider, so the worker cannot launch. The runtime deliberately never infers a provider from a model's spelling (a name like \"gpt-...\" does not auto-select OpenAI); without a resolvable route the launch is refused rather than sent to a wrong provider. The message tells you whether an explicit provider was set or resolution fell through to the session/default provider.","triggerScenarios":"A typo in the pinned model id; an explicit provider set in the profile but the model absent from that provider's catalog; the provider unconfigured (no credentials/base_url) so nothing resolves; a role carrying a pinned model that no longer exists after a provider-side rename.","commonSituations":"Upgrading a provider SDK/config that renamed model ids; profiles written for one provider used against another; models behind an allowlist-restricted API key that hides them from resolution.","solutions":["Set an explicit provider for the model in the agent profile, so resolution targets the right catalog.","Verify the exact model id against the provider's current model list and fix typos or outdated names.","Configure the provider fully (credentials, base_url) so its models are resolvable at all.","If you do not need a pin, switch the role to `inherit` to ride the session model."],"exampleFix":"# before (agent profile TOML)\nid = \"reviewer\"\nmodel = \"deepseek-chatx\"   # typo, resolves nowhere\n\n# after\nid = \"reviewer\"\nprovider = \"deepseek\"\nmodel = \"deepseek-chat\"","handlingStrategy":"validation","validationCode":"// Pre-flight: a pinned model must resolve on a configured provider before you submit the spec.\nfn model_resolves(model: &str, provider: Option<&str>, configured: &ModelCatalog) -> bool {\n    match provider {\n        Some(p) => configured.serves(p, model),\n        None => configured.serves_any(model),\n    }\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = build_worker_spec(&task, &profiles) {\n    let msg = e.to_string();\n    if msg.contains(\"does not resolve to a real model\") {\n        // fix the pin: explicit provider, correct model id, or role = \"inherit\"\n    }\n}","preventionTips":["Never rely on model-name spelling to imply a provider — set the provider explicitly.","Keep a checked list of valid provider/model pairs and lint task specs against it.","When a provider renames models, grep your profile TOMLs for the old id before upgrading."],"tags":["fleet","model-routing","provider","validation","rust"],"backgroundTag":"model-not-found","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}