{"record":{"id":"ea6a15af77ca1d41","repo":"Hmbown/CodeWhale","slug":"fleet-task-selects-member-with-pinned-model-on-worker-model","errorCode":null,"errorMessage":"Fleet task {} selects member {:?} with pinned model {} on {}; worker.model {:?} conflicts with that member route","messagePattern":"Fleet task (.+?) selects member (.+?) with pinned model (.+?) on (.+?); worker\\.model (.+?) conflicts with that member route","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/worker_runtime.rs","lineNumber":1054,"sourceCode":"        .as_ref()\n        .and_then(|worker| worker.model.as_deref())\n        .and_then(non_empty_trimmed)\n    else {\n        return Ok(());\n    };\n    let Some(profile_model) = profile.profile.model.as_deref().and_then(non_empty_trimmed) else {\n        return Ok(());\n    };\n    if profile_model.eq_ignore_ascii_case(\"auto\") {\n        return Ok(());\n    }\n    let profile_provider = profile\n        .profile\n        .provider\n        .as_deref()\n        .and_then(non_empty_trimmed);\n    if !requested_model_matches_pin(task_model, profile_model, profile_provider) {\n        bail!(\n            \"Fleet task {} selects member {:?} with pinned model {} on {}; worker.model {:?} conflicts with that member route\",\n            task_spec.id,\n            profile.id,\n            profile_model,\n            profile_provider.unwrap_or(\"the session provider\"),\n            task_model\n        );\n    }\n    Ok(())\n}\n\nfn effective_fleet_role(\n    worker_profile: Option<&FleetTaskWorkerProfile>,\n    agent_profile: Option<&AgentProfile>,\n) -> Option<String> {\n    effective_fleet_role_with_source(worker_profile, agent_profile).0\n}\n","sourceCodeStart":1036,"sourceCodeEnd":1072,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/worker_runtime.rs#L1036-L1072","documentation":"The task pins a worker model (worker.model) that conflicts with the model pinned on the selected member's agent profile for its provider. validate_selected_member_model compares the task-level model against the member profile's pinned model and provider via requested_model_matches_pin, and refuses a route where the two pins disagree — the same member would be asked for two different models.","triggerScenarios":"freeze_fleet_task_members or resolve_task_agent_profile encounter a task that selects an agent profile whose profile.model is set to X (on provider P or the session provider) while task_spec's worker.model is Y, and requested_model_matches_pin judges them non-matching.","commonSituations":"Setting worker.model globally for a fleet whose members each pin their own model; upgrading a member profile's pinned model without updating task worker.model; provider-specific pins where the task model names a provider different from the profile's provider.","solutions":["Remove worker.model from the task spec so the member profile's pinned model governs.","Update the task's worker.model to exactly match the member profile's pinned model (and provider).","Update the member profile's pinned model to the value the task requests.","Give the task a different agent profile whose pin matches, if the task genuinely needs the other model."],"exampleFix":"// before\nworker.model = \"gpt-4o\"\nagent_profile = { id = \"researcher\", model = \"claude-sonnet-4\" }\n// after\nworker.model = \"claude-sonnet-4\"  # or omit worker.model entirely","handlingStrategy":"validation","validationCode":"fn pins_agree(task_model: &str, profile: &AgentProfile) -> bool {\n    profile.profile.model.as_deref().map_or(true, |m| m == task_model)\n}","typeGuard":null,"tryCatchPattern":"match freeze_fleet_task_members(&mut spec) {\n    Err(e) if e.to_string().contains(\"conflicts with that member route\") => {\n        eprintln!(\"drop worker.model or align it with the member profile pin\"); }\n    other => other?,\n}","preventionTips":["Set model pins in exactly one place — member profile or task, not both","Regenerate fleet configs when member profile models change","Add a config lint that flags tasks setting worker.model alongside a pinning profile"],"tags":["fleet","config","model-routing"],"backgroundTag":"conflicting-config-options","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"}