Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/llm/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -36,7 +40,7 @@ pub struct RoutingConfig {

impl Default for RoutingConfig {
fn default() -> Self {
Self::for_model("anthropic/claude-sonnet-4".into())
Self::for_model(DEFAULT_ANTHROPIC_MODEL.into())
}
}

Expand Down Expand Up @@ -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".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();
Expand Down