From 947de2fc2cc44fad4cd91b3d3f77173f8e807673 Mon Sep 17 00:00:00 2001 From: Jayson Grace Date: Wed, 27 May 2026 09:07:01 -0600 Subject: [PATCH] fix: honor blue-specific llm model configuration **Changed:** - Blue worker model selection now prefers `ARES_BLUE_LLM_MODEL`, falls back to `ARES_LLM_MODEL`, ignores empty values, and errors clearly when no LLM model is configured instead of using a hardcoded default. --- ares-cli/src/worker/mod.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ares-cli/src/worker/mod.rs b/ares-cli/src/worker/mod.rs index de41367b..3e4fe9f9 100644 --- a/ares-cli/src/worker/mod.rs +++ b/ares-cli/src/worker/mod.rs @@ -121,9 +121,16 @@ pub async fn run() -> anyhow::Result<()> { } #[cfg(feature = "blue")] config::WorkerMode::BlueTask => { - // Blue team mode requires an LLM provider - let model_spec = std::env::var("ARES_LLM_MODEL") - .unwrap_or_else(|_| "anthropic/claude-sonnet-4-20250514".to_string()); + // Blue team mode requires an LLM provider. Prefer the blue-specific + // override, then fall back to the shared model var. Matches the + // orchestrator's blue-only mode (see orchestrator/mod.rs). + let model_spec = std::env::var("ARES_BLUE_LLM_MODEL") + .ok() + .filter(|s| !s.is_empty()) + .or_else(|| std::env::var("ARES_LLM_MODEL").ok().filter(|s| !s.is_empty())) + .ok_or_else(|| anyhow::anyhow!( + "No LLM model configured for blue worker — set ARES_BLUE_LLM_MODEL or ARES_LLM_MODEL" + ))?; let (provider, model_name) = match ares_llm::create_provider(&model_spec) { Ok(p) => p, Err(e) => {