From f3154b20a559e0d5b3d0025b13827adb66e1fae0 Mon Sep 17 00:00:00 2001 From: hyiip Date: Tue, 25 Feb 2025 03:55:24 +0800 Subject: [PATCH 1/2] claude 3.7 support --- app/constant.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/constant.ts b/app/constant.ts index 50aaf7921..02ba8dc81 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -535,6 +535,8 @@ const anthropicModels = [ "claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-latest", + "claude-3-7-sonnet-20250219", + "claude-3-7-sonnet-latest", ]; const baiduModels = [ From ebcb4db245d3b7b4d34f807c5c7aaa5975ac5330 Mon Sep 17 00:00:00 2001 From: Rex Ng Date: Tue, 25 Feb 2025 14:30:18 +0800 Subject: [PATCH 2/2] Fix: Improve Mistral icon detection and remove redundant code. - Added "codestral" to the list of acceptable names for the Mistral icon, ensuring proper detection. - Removed duplicate `toLowerCase()` calls. --- app/components/emoji.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/emoji.tsx b/app/components/emoji.tsx index 1bf39ac1d..31d7f0ac6 100644 --- a/app/components/emoji.tsx +++ b/app/components/emoji.tsx @@ -66,11 +66,11 @@ export function Avatar(props: { model?: ModelType; avatar?: string }) { LlmIcon = BotIconGemma; } else if (modelName.startsWith("claude")) { LlmIcon = BotIconClaude; - } else if (modelName.toLowerCase().includes("llama")) { + } else if (modelName.includes("llama")) { LlmIcon = BotIconMeta; - } else if (modelName.startsWith("mixtral")) { + } else if (modelName.startsWith("mixtral") || modelName.startsWith("codestral")) { LlmIcon = BotIconMistral; - } else if (modelName.toLowerCase().includes("deepseek")) { + } else if (modelName.includes("deepseek")) { LlmIcon = BotIconDeepseek; } else if (modelName.startsWith("moonshot")) { LlmIcon = BotIconMoonshot; @@ -85,7 +85,7 @@ export function Avatar(props: { model?: ModelType; avatar?: string }) { } else if (modelName.startsWith("doubao") || modelName.startsWith("ep-")) { LlmIcon = BotIconDoubao; } else if ( - modelName.toLowerCase().includes("glm") || + modelName.includes("glm") || modelName.startsWith("cogview-") || modelName.startsWith("cogvideox-") ) {