瀏覽代碼

fix: Update the regular expressions to support image upload functionality for multimodal Claude 4 and Gemini 2.5 series.

LePao1 4 月之前
父節點
當前提交
e8a18d0b38
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      app/constant.ts

+ 5 - 4
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/];