{"record":{"id":"ef83e495800c8396","repo":"Hmbown/CodeWhale","slug":"fleet-task-has-no-provider-authority-for-model-model-source","errorCode":null,"errorMessage":"Fleet task `{}` has no provider authority for model `{model}` (source={source}); attach the resolved route config or set the agent profile provider explicitly","messagePattern":"Fleet task `(.+?)` has no provider authority for model `(.+?)` \\(source=(.+?)\\); attach the resolved route config or set the agent profile provider explicitly","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/worker_runtime.rs","lineNumber":283,"sourceCode":"/// instead of failing silently inside the worker. Every task must have either\n/// the resolved session config or an explicit profile provider; inherited\n/// session/run models are validated within that already-authorized scope.\npub fn validate_fleet_task_routes(\n    tasks: &[FleetTaskSpec],\n    agent_profiles: &[AgentProfile],\n    session_model: Option<&str>,\n    config: Option<&Config>,\n) -> Result<()> {\n    let run_model = session_model.unwrap_or(\"auto\");\n    for task in tasks {\n        let agent_profile = resolve_task_agent_profile(task, agent_profiles)?;\n        let agent_profile = agent_profile.as_deref();\n        let (model, source) =\n            effective_fleet_model_with_source(run_model, task.worker.as_ref(), agent_profile);\n        let pinned_model = matches!(source, \"task.model\" | \"agent_profile.model\");\n        let explicit_provider = explicit_fleet_provider_id(agent_profile);\n        if config.is_none() && explicit_provider.is_none() {\n            bail!(\n                \"Fleet task `{}` has no provider authority for model `{model}` (source={source}); attach the resolved route config or set the agent profile provider explicitly\",\n                task.id,\n            );\n        }\n        if config.is_none()\n            && let Some(provider_id) = explicit_provider.as_deref()\n            && ApiProvider::parse(provider_id)\n                .is_none_or(|provider| provider == ApiProvider::Custom)\n        {\n            bail!(\n                \"Fleet task `{}` names custom provider=`{provider_id}`, but a provider name alone does not prove its endpoint or model; attach the live route config before creating the run\",\n                task.id,\n            );\n        }\n        if pinned_model && explicit_provider.is_none() {\n            let config = config.expect(\"provider authority checked above\");\n            let (provider, base_url) = (config.api_provider(), config.active_route_base_url());\n            if let Err(reason) =","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/worker_runtime.rs#L265-L301","documentation":"Fleet route validation found no provider authority for a task's effective model: neither a resolved route config is attached to the run nor does the agent profile name an explicit provider. Without one, the worker cannot know which provider/endpoint serves the pinned model, so run creation is refused.","triggerScenarios":"Calling validate_fleet_task_routes on a task whose effective model source is task.model or agent_profile.model while config is None and the agent profile carries no explicit provider id.","commonSituations":"Creating a Fleet run with a model pinned in task config but no route config attached (configless fleet); agent profile created without a provider field; tests or scripts constructing runs without loading route config.","solutions":["Attach the resolved route config to the run before creating it.","Set the agent profile's provider explicitly so the model has an authority.","Remove the model pin so the task inherits run-level routing."],"exampleFix":"// before\nrun.create(task_id, model=\"deepseek-chat\")  // no route config\n// after\nrun.create(task_id, model=\"deepseek-chat\", route_config=resolved_config)","handlingStrategy":"validation","validationCode":"fn has_provider_authority(config: Option<&RouteConfig>, profile: Option<&AgentProfile>) -> bool { config.is_some() || profile.and_then(explicit_fleet_provider_id).is_some() }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always attach resolved route config when pinning models","Set provider explicitly on agent profiles used in configless fleets","Run validate_fleet_task_routes before run creation in CI"],"tags":["fleet","provider","routing"],"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"}