Hmbown/CodeWhale · error

Fleet task ` ` has no provider authority for model ` `…

Error message

Fleet task `{}` has no provider authority for model `{model}` (source={source}); attach the resolved route config or set the agent profile provider explicitly

What it means

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.

Solutions

  1. Attach the resolved route config to the run before creating it.
  2. Set the agent profile's provider explicitly so the model has an authority.
  3. Remove the model pin so the task inherits run-level routing.

Example fix

// before
run.create(task_id, model="deepseek-chat")  // no route config
// after
run.create(task_id, model="deepseek-chat", route_config=resolved_config)
Defensive patterns

Strategy: validation

Validate before calling

fn has_provider_authority(config: Option<&RouteConfig>, profile: Option<&AgentProfile>) -> bool { config.is_some() || profile.and_then(explicit_fleet_provider_id).is_some() }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/ef83e495800c8396. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/fleet/worker_runtime.rs:283

/// instead of failing silently inside the worker. Every task must have either
/// the resolved session config or an explicit profile provider; inherited
/// session/run models are validated within that already-authorized scope.
pub fn validate_fleet_task_routes(
    tasks: &[FleetTaskSpec],
    agent_profiles: &[AgentProfile],
    session_model: Option<&str>,
    config: Option<&Config>,
) -> Result<()> {
    let run_model = session_model.unwrap_or("auto");
    for task in tasks {
        let agent_profile = resolve_task_agent_profile(task, agent_profiles)?;
        let agent_profile = agent_profile.as_deref();
        let (model, source) =
            effective_fleet_model_with_source(run_model, task.worker.as_ref(), agent_profile);
        let pinned_model = matches!(source, "task.model" | "agent_profile.model");
        let explicit_provider = explicit_fleet_provider_id(agent_profile);
        if config.is_none() && explicit_provider.is_none() {
            bail!(
                "Fleet task `{}` has no provider authority for model `{model}` (source={source}); attach the resolved route config or set the agent profile provider explicitly",
                task.id,
            );
        }
        if config.is_none()
            && let Some(provider_id) = explicit_provider.as_deref()
            && ApiProvider::parse(provider_id)
                .is_none_or(|provider| provider == ApiProvider::Custom)
        {
            bail!(
                "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",
                task.id,
            );
        }
        if pinned_model && explicit_provider.is_none() {
            let config = config.expect("provider authority checked above");
            let (provider, base_url) = (config.api_provider(), config.active_route_base_url());
            if let Err(reason) =

View on GitHub (pinned to 73e0f67d83)