diff --git a/llm_client/src/clients/anthropic.rs b/llm_client/src/clients/anthropic.rs index f090694f6..12028795e 100644 --- a/llm_client/src/clients/anthropic.rs +++ b/llm_client/src/clients/anthropic.rs @@ -402,6 +402,7 @@ impl AnthropicClient { match llm_type { LLMType::ClaudeOpus => Ok("claude-3-opus-20240229".to_owned()), LLMType::ClaudeSonnet => Ok("claude-3-5-sonnet-20241022".to_owned()), + LLMType::ClaudeSonnet37 => Ok("claude-3-7-sonnet-20250219".to_owned()), LLMType::ClaudeHaiku => Ok("claude-3-haiku-20240307".to_owned()), LLMType::Custom(model) => Ok(model.to_owned()), _ => Err(LLMClientError::UnSupportedModel), diff --git a/llm_client/src/clients/codestory.rs b/llm_client/src/clients/codestory.rs index 206d23a8a..b1f1fe421 100644 --- a/llm_client/src/clients/codestory.rs +++ b/llm_client/src/clients/codestory.rs @@ -165,8 +165,8 @@ impl CodeStoryClient { LLMType::DeepSeekCoder33BInstruct => { Ok("deepseek-ai/deepseek-coder-33b-instruct".to_owned()) } - LLMType::ClaudeSonnet => Ok("claude-3-5-sonnet-20241022".to_owned()), // updated to latest sonnet - LLMType::ClaudeHaiku => Ok("claude-3-5-haiku-20241022".to_owned()), // updated to latest haiku + LLMType::ClaudeSonnet => Ok("claude-3-5-sonnet-20241022".to_owned()), + LLMType::ClaudeHaiku => Ok("claude-3-5-haiku-20241022".to_owned()), LLMType::GeminiPro => Ok("google/gemini-flash-1.5".to_owned()), LLMType::GeminiProFlash => Ok("gemini-1.5-flash".to_owned()), LLMType::Gemini2_0Flash => Ok("google/gemini-2.0-flash-001".to_owned()), @@ -199,7 +199,7 @@ impl CodeStoryClient { LLMType::CodeLlama13BInstruct | LLMType::CodeLlama7BInstruct | LLMType::DeepSeekCoder33BInstruct => Ok(self.together_api_endpoint(&self.api_base)), - LLMType::ClaudeSonnet | LLMType::ClaudeHaiku => { + LLMType::ClaudeSonnet | LLMType::ClaudeSonnet37 | LLMType::ClaudeHaiku => { Ok(self.openrouter_api_endpoint(&self.api_base)) } LLMType::GeminiPro | LLMType::GeminiProFlash | LLMType::Gemini2_0Flash => { @@ -516,4 +516,4 @@ impl LLMClient for CodeStoryClient { } Ok(buffered_stream) } -} +} \ No newline at end of file diff --git a/llm_client/src/clients/types.rs b/llm_client/src/clients/types.rs index de003ebdf..3789c5a49 100644 --- a/llm_client/src/clients/types.rs +++ b/llm_client/src/clients/types.rs @@ -134,6 +134,7 @@ impl<'de> Deserialize<'de> for LLMType { "DeepSeekCoder33BInstruct" => Ok(LLMType::DeepSeekCoder33BInstruct), "ClaudeOpus" => Ok(LLMType::ClaudeOpus), "ClaudeSonnet" => Ok(LLMType::ClaudeSonnet), + "ClaudeSonnet37" => Ok(LLMType::ClaudeSonnet37), "ClaudeHaiku" => Ok(LLMType::ClaudeHaiku), "PPLXSonnetSmall" => Ok(LLMType::PPLXSonnetSmall), "CohereRerankV3" => Ok(LLMType::CohereRerankV3), @@ -196,7 +197,7 @@ impl LLMType { pub fn is_anthropic(&self) -> bool { matches!( self, - LLMType::ClaudeOpus | LLMType::ClaudeSonnet | LLMType::ClaudeHaiku + LLMType::ClaudeOpus | LLMType::ClaudeSonnet | LLMType::ClaudeHaiku | LLMType::ClaudeSonnet37 ) } @@ -248,6 +249,7 @@ impl fmt::Display for LLMType { LLMType::DeepSeekCoderV3 => write!(f, "deepseek/deepseek-chat"), LLMType::ClaudeOpus => write!(f, "ClaudeOpus"), LLMType::ClaudeSonnet => write!(f, "ClaudeSonnet"), + LLMType::ClaudeSonnet37 => write!(f, "ClaudeSonnet37"), LLMType::ClaudeHaiku => write!(f, "ClaudeHaiku"), LLMType::PPLXSonnetSmall => write!(f, "PPLXSonnetSmall"), LLMType::CohereRerankV3 => write!(f, "CohereRerankV3"), @@ -1048,4 +1050,4 @@ mod tests { let str_llm_type = serde_json::to_string(&llm_type).expect("to work"); assert_eq!(str_llm_type, ""); } -} +} \ No newline at end of file