From e8a18d0b38baec7a5aac29773f5cf4e7022f725f Mon Sep 17 00:00:00 2001 From: LePao1 <2814411507@qq.com> Date: Sun, 13 Jul 2025 21:20:20 +0800 Subject: [PATCH] fix: Update the regular expressions to support image upload functionality for multimodal Claude 4 and Gemini 2.5 series. --- app/constant.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/constant.ts b/app/constant.ts index 3660877e0..ba622d979 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -479,19 +479,20 @@ export const VISION_MODEL_REGEXES = [ /vision/, /gpt-4o/, /gpt-4\.1/, - /claude-3/, + /claude.*[34]/, /gemini-1\.5/, /gemini-exp/, - /gemini-2\.0/, + /gemini-2\.[05]/, /learnlm/, /qwen-vl/, /qwen2-vl/, - /gpt-4-turbo(?!.*preview)/, // Matches "gpt-4-turbo" but not "gpt-4-turbo-preview" - /^dall-e-3$/, // Matches exactly "dall-e-3" + /gpt-4-turbo(?!.*preview)/, + /^dall-e-3$/, /glm-4v/, /vl/i, /o3/, /o4-mini/, + /grok-4/i, ]; export const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];