Skip to content

Commit 29c43e9

Browse files
authored
Merge pull request #2102 from codestoryai/codestoryai_sidecar_issue_2101_009d47fb
2 parents 07df8b8 + 7680634 commit 29c43e9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

llm_client/src/clients/anthropic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ impl AnthropicClient {
402402
match llm_type {
403403
LLMType::ClaudeOpus => Ok("claude-3-opus-20240229".to_owned()),
404404
LLMType::ClaudeSonnet => Ok("claude-3-5-sonnet-20241022".to_owned()),
405+
LLMType::ClaudeSonnet3_7 => Ok("claude-3-7-sonnet-20250219".to_owned()),
405406
LLMType::ClaudeHaiku => Ok("claude-3-haiku-20240307".to_owned()),
406407
LLMType::Custom(model) => Ok(model.to_owned()),
407408
_ => Err(LLMClientError::UnSupportedModel),

llm_client/src/clients/codestory.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ impl CodeStoryClient {
166166
Ok("deepseek-ai/deepseek-coder-33b-instruct".to_owned())
167167
}
168168
LLMType::ClaudeSonnet => Ok("claude-3-5-sonnet-20241022".to_owned()), // updated to latest sonnet
169+
LLMType::ClaudeSonnet3_7 => Ok("claude-3-7-sonnet-20250219".to_owned()),
169170
LLMType::ClaudeHaiku => Ok("claude-3-5-haiku-20241022".to_owned()), // updated to latest haiku
170171
LLMType::GeminiPro => Ok("google/gemini-flash-1.5".to_owned()),
171172
LLMType::GeminiProFlash => Ok("gemini-1.5-flash".to_owned()),
@@ -199,7 +200,7 @@ impl CodeStoryClient {
199200
LLMType::CodeLlama13BInstruct
200201
| LLMType::CodeLlama7BInstruct
201202
| LLMType::DeepSeekCoder33BInstruct => Ok(self.together_api_endpoint(&self.api_base)),
202-
LLMType::ClaudeSonnet | LLMType::ClaudeHaiku => {
203+
LLMType::ClaudeSonnet | LLMType::ClaudeSonnet3_7 | LLMType::ClaudeHaiku => {
203204
Ok(self.openrouter_api_endpoint(&self.api_base))
204205
}
205206
LLMType::GeminiPro | LLMType::GeminiProFlash | LLMType::Gemini2_0Flash => {

llm_client/src/clients/types.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ impl<'de> Deserialize<'de> for LLMType {
134134
"DeepSeekCoder33BInstruct" => Ok(LLMType::DeepSeekCoder33BInstruct),
135135
"ClaudeOpus" => Ok(LLMType::ClaudeOpus),
136136
"ClaudeSonnet" => Ok(LLMType::ClaudeSonnet),
137+
"ClaudeSonnet3_7" => Ok(LLMType::ClaudeSonnet3_7),
137138
"ClaudeHaiku" => Ok(LLMType::ClaudeHaiku),
138139
"PPLXSonnetSmall" => Ok(LLMType::PPLXSonnetSmall),
139140
"CohereRerankV3" => Ok(LLMType::CohereRerankV3),
@@ -196,7 +197,7 @@ impl LLMType {
196197
pub fn is_anthropic(&self) -> bool {
197198
matches!(
198199
self,
199-
LLMType::ClaudeOpus | LLMType::ClaudeSonnet | LLMType::ClaudeHaiku
200+
LLMType::ClaudeOpus | LLMType::ClaudeSonnet | LLMType::ClaudeSonnet3_7 | LLMType::ClaudeHaiku
200201
)
201202
}
202203

@@ -248,6 +249,7 @@ impl fmt::Display for LLMType {
248249
LLMType::DeepSeekCoderV3 => write!(f, "deepseek/deepseek-chat"),
249250
LLMType::ClaudeOpus => write!(f, "ClaudeOpus"),
250251
LLMType::ClaudeSonnet => write!(f, "ClaudeSonnet"),
252+
LLMType::ClaudeSonnet3_7 => write!(f, "ClaudeSonnet3_7"),
251253
LLMType::ClaudeHaiku => write!(f, "ClaudeHaiku"),
252254
LLMType::PPLXSonnetSmall => write!(f, "PPLXSonnetSmall"),
253255
LLMType::CohereRerankV3 => write!(f, "CohereRerankV3"),
@@ -1048,4 +1050,4 @@ mod tests {
10481050
let str_llm_type = serde_json::to_string(&llm_type).expect("to work");
10491051
assert_eq!(str_llm_type, "");
10501052
}
1051-
}
1053+
}

0 commit comments

Comments
 (0)