From 37f815f9f81dedf5277da041f7cfb7e7ea9ba9e3 Mon Sep 17 00:00:00 2001 From: Marc M <8666222+marcmantei@users.noreply.github.com> Date: Thu, 7 May 2026 21:14:02 +0200 Subject: [PATCH 1/2] fix(routing): use fully qualified Anthropic model ID The default routing model "anthropic/claude-sonnet-4" is not a valid model identifier for the Anthropic API. This causes failures when using OAuth authentication (Claude Pro/Max subscription) since the API requires the fully qualified model ID with date suffix. Changes both the Default impl and defaults_for_provider to use "anthropic/claude-sonnet-4-20250514". Co-Authored-By: Claude Co-Authored-By: Happy --- src/llm/routing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llm/routing.rs b/src/llm/routing.rs index 54fa66bd0..434e43de2 100644 --- a/src/llm/routing.rs +++ b/src/llm/routing.rs @@ -36,7 +36,7 @@ pub struct RoutingConfig { impl Default for RoutingConfig { fn default() -> Self { - Self::for_model("anthropic/claude-sonnet-4".into()) + Self::for_model("anthropic/claude-sonnet-4-20250514".into()) } } @@ -164,7 +164,7 @@ pub fn is_context_overflow_error(error_message: &str) -> bool { /// each provider sane defaults so things work out of the box. pub fn defaults_for_provider(provider: &str) -> RoutingConfig { match provider { - "anthropic" => RoutingConfig::for_model("anthropic/claude-sonnet-4".into()), + "anthropic" => RoutingConfig::for_model("anthropic/claude-sonnet-4-20250514".into()), "openrouter" => { let channel: String = "openrouter/anthropic/claude-sonnet-4-20250514".into(); let worker: String = "openrouter/anthropic/claude-haiku-4.5-20250514".into(); From 836ee6a702198d113bcdeb6a119a1b11905f2dd0 Mon Sep 17 00:00:00 2001 From: Marc M <8666222+marcmantei@users.noreply.github.com> Date: Sat, 16 May 2026 13:57:33 +0200 Subject: [PATCH 2/2] refactor(routing): extract default model ID into constant Centralizes the Anthropic default model identifier to prevent future drift when the dated model ID is bumped. Co-Authored-By: Claude Co-Authored-By: Happy --- src/llm/routing.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/llm/routing.rs b/src/llm/routing.rs index 434e43de2..fe0d0640e 100644 --- a/src/llm/routing.rs +++ b/src/llm/routing.rs @@ -3,6 +3,10 @@ use crate::ProcessType; use std::collections::HashMap; +/// Default Anthropic model identifier. Centralized here so bumping the dated +/// model ID only requires a single change. +const DEFAULT_ANTHROPIC_MODEL: &str = "anthropic/claude-sonnet-4-20250514"; + /// Model routing configuration. Lives on the agent config (via defaults). /// Determines which LLM model each process type uses, with task-type /// overrides for workers/branches and fallback chains for resilience. @@ -36,7 +40,7 @@ pub struct RoutingConfig { impl Default for RoutingConfig { fn default() -> Self { - Self::for_model("anthropic/claude-sonnet-4-20250514".into()) + Self::for_model(DEFAULT_ANTHROPIC_MODEL.into()) } } @@ -164,7 +168,7 @@ pub fn is_context_overflow_error(error_message: &str) -> bool { /// each provider sane defaults so things work out of the box. pub fn defaults_for_provider(provider: &str) -> RoutingConfig { match provider { - "anthropic" => RoutingConfig::for_model("anthropic/claude-sonnet-4-20250514".into()), + "anthropic" => RoutingConfig::for_model(DEFAULT_ANTHROPIC_MODEL.into()), "openrouter" => { let channel: String = "openrouter/anthropic/claude-sonnet-4-20250514".into(); let worker: String = "openrouter/anthropic/claude-haiku-4.5-20250514".into();