{"record":{"id":"f77dc646fcaedc68","repo":"Hmbown/CodeWhale","slug":"fleet-task-cannot-resolve-its-inherited-model-model-with","errorCode":null,"errorMessage":"Fleet task `{}` cannot resolve its inherited model `{model}` with {provider} (source={source}); attach the live route config for custom providers before creating the run","messagePattern":"Fleet task `(.+?)` cannot resolve its inherited model `(.+?)` with (.+?) \\(source=(.+?)\\); attach the live route config for custom providers before creating the run","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/worker_runtime.rs","lineNumber":326,"sourceCode":"        let route = resolve_fleet_route_with_config(task, agent_profiles, session_model, config);\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        if route.is_none() {\n            if pinned_model {\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            bail!(\n                \"Fleet task `{}` cannot resolve its inherited model `{model}` with {provider} \\\n                 (source={source}); attach the live route config for custom providers before \\\n                 creating the run\",\n                task.id,\n            );\n        }\n        validate_fleet_reasoning_effort(task, agent_profiles, session_model, config)?;\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).\nfn validate_fleet_reasoning_effort(","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/worker_runtime.rs#L308-L344","documentation":"When the route is unresolved and the model was inherited (not pinned — sources like session/run default), validate_fleet_task_routes fails with this error. The inherited model `{model}` cannot be resolved with the effective provider (explicit profile provider or the session/default provider), and the fix is to attach the live route config, which custom providers require to prove their endpoint and model catalog.","triggerScenarios":"Calling validate_fleet_task_routes where resolve_fleet_route_with_config returns None and the effective model source is not `task.model`/`agent_profile.model` — i.e. the model is inherited from the session/run while only a provider name (possibly custom) or no provider is available, and no live route config proves the route.","commonSituations":"Creating a Fleet run without attaching resolved Config while the session model points at a custom provider endpoint; CI or headless contexts where the run is constructed from stored task specs but the session route config was never loaded.","solutions":["Attach the live route config (pass Some(&Config) to validate_fleet_task_routes / run creation) so custom providers can be resolved.","Set an explicit, non-custom provider on the agent profile for the task.","Change the task role to `inherit` against a resolvable session provider.","Pick a session model that resolves on the currently configured providers."],"exampleFix":"// before\nlet run = fleet_run.create(tasks)?; // no config attached\n\n// after\nlet run = fleet_run.create_with_config(tasks, &resolved_session_config)?;","handlingStrategy":"validation","validationCode":"if inherited_model && config.is_none() && provider_is_custom() {\n    return Err(\"attach live route config before creating the run\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always create Fleet runs with the resolved session Config attached.","Avoid custom providers in headless/CI runs without an attached route config.","Check that the session model resolves before launching tasks that inherit it."],"tags":["fleet","model-route","config","custom-provider"],"backgroundTag":"missing-required-config","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}