Vision models clean-up
| @@ -5098,68 +5098,36 @@ export function isImageInliningSupported() { | |||
| 5098 | 5098 | ||
| 5099 | // gultra just isn't being offered as multimodal, thanks google. | 5099 | // gultra just isn't being offered as multimodal, thanks google. |
| 5100 | const visionSupportedModels = [ | 5100 | const visionSupportedModels = [ |
| 5101 | 'gpt-4-vision', | 5101 | // OpenAI |
| 5102 | 'gemini-2.5-pro-exp-03-25', | 5102 | 'chatgpt-4o-latest', |
| 5103 | 'gemini-2.5-pro-preview-03-25', | ||
| 5104 | 'gemini-2.0-pro-exp', | ||
| 5105 | 'gemini-2.0-pro-exp-02-05', | ||
| 5106 | 'gemini-2.5-flash-preview-04-17', | ||
| 5107 | 'gemini-2.0-flash-lite-preview', | ||
| 5108 | 'gemini-2.0-flash-lite-preview-02-05', | ||
| 5109 | 'gemini-2.0-flash', | ||
| 5110 | 'gemini-2.0-flash-001', | ||
| 5111 | 'gemini-2.0-flash-thinking-exp-1219', | ||
| 5112 | 'gemini-2.0-flash-thinking-exp-01-21', | ||
| 5113 | 'gemini-2.0-flash-thinking-exp', | ||
| 5114 | 'gemini-2.0-flash-exp', | ||
| 5115 | 'gemini-2.0-flash-exp-image-generation', | ||
| 5116 | 'gemini-1.5-flash', | ||
| 5117 | 'gemini-1.5-flash-latest', | ||
| 5118 | 'gemini-1.5-flash-001', | ||
| 5119 | 'gemini-1.5-flash-002', | ||
| 5120 | 'gemini-1.5-flash-exp-0827', | ||
| 5121 | 'gemini-1.5-flash-8b', | ||
| 5122 | 'gemini-1.5-flash-8b-exp-0827', | ||
| 5123 | 'gemini-1.5-flash-8b-exp-0924', | ||
| 5124 | 'gemini-exp-1114', | ||
| 5125 | 'gemini-exp-1121', | ||
| 5126 | 'gemini-exp-1206', | ||
| 5127 | 'gemini-1.0-pro-vision-latest', | ||
| 5128 | 'gemini-1.5-pro', | ||
| 5129 | 'gemini-1.5-pro-latest', | ||
| 5130 | 'gemini-1.5-pro-001', | ||
| 5131 | 'gemini-1.5-pro-002', | ||
| 5132 | 'gemini-1.5-pro-exp-0801', | ||
| 5133 | 'gemini-1.5-pro-exp-0827', | ||
| 5134 | 'claude-3', | ||
| 5135 | 'claude-3-5', | ||
| 5136 | 'claude-3-7', | ||
| 5137 | 'gpt-4-turbo', | 5103 | 'gpt-4-turbo', |
| 5138 | 'gpt-4o', | 5104 | 'gpt-4-vision', |
| 5139 | 'gpt-4o-mini', | 5105 | 'gpt-4.1', |
| 5140 | 'gpt-4.5-preview', | 5106 | 'gpt-4.5-preview', |
| 5141 | 'gpt-4.5-preview-2025-02-27', | 5107 | 'gpt-4o', |
| 5142 | 'o1', | 5108 | 'o1', |
| 5143 | 'o1-2024-12-17', | 5109 | 'o3', |
| 5144 | 'chatgpt-4o-latest', | 5110 | 'o4-mini', |
| 5111 | // 01.AI (Yi) | ||
| 5145 | 'yi-vision', | 5112 | 'yi-vision', |
| 5146 | 'mistral-large-pixtral-2411', | 5113 | // Claude |
| 5114 | 'claude-3', | ||
| 5115 | // Cohere | ||
| 5116 | 'c4ai-aya-vision', | ||
| 5117 | // Google AI Studio | ||
| 5118 | 'gemini-1.5', | ||
| 5119 | 'gemini-2.0', | ||
| 5120 | 'gemini-2.5', | ||
| 5121 | 'gemini-exp-1114', | ||
| 5122 | 'gemini-exp-1121', | ||
| 5123 | 'gemini-exp-1206', | ||
| 5124 | // MistralAI | ||
| 5147 | 'mistral-small-2503', | 5125 | 'mistral-small-2503', |
| 5148 | 'mistral-small-latest', | 5126 | 'mistral-small-latest', |
| 5149 | 'pixtral-12b-latest', | 5127 | 'pixtral', |
| 5150 | 'pixtral-12b', | 5128 | // xAI (Grok) |
| 5151 | 'pixtral-12b-2409', | ||
| 5152 | 'pixtral-large-latest', | ||
| 5153 | 'pixtral-large-2411', | ||
| 5154 | 'c4ai-aya-vision-8b', | ||
| 5155 | 'c4ai-aya-vision-32b', | ||
| 5156 | 'grok-2-vision', | 5129 | 'grok-2-vision', |
| 5157 | 'grok-vision', | 5130 | 'grok-vision', |
| 5158 | 'gpt-4.1', | ||
| 5159 | 'o3', | ||
| 5160 | 'o3-2025-04-16', | ||
| 5161 | 'o4-mini', | ||
| 5162 | 'o4-mini-2025-04-16', | ||
| 5163 | ]; | 5131 | ]; |
| 5164 | 5132 | ||
| 5165 | switch (oai_settings.chat_completion_source) { | 5133 | switch (oai_settings.chat_completion_source) { |
| @@ -359,41 +359,16 @@ export function convertCohereMessages(messages, names) { | |||
| 359 | * @returns {{contents: *[], system_instruction: {parts: {text: string}}}} Prompt for Google MakerSuite models | 359 | * @returns {{contents: *[], system_instruction: {parts: {text: string}}}} Prompt for Google MakerSuite models |
| 360 | */ | 360 | */ |
| 361 | export function convertGooglePrompt(messages, model, useSysPrompt, names) { | 361 | export function convertGooglePrompt(messages, model, useSysPrompt, names) { |
| 362 | const visionSupportedModels = [ | 362 | const visionSupportedModelPrefix = [ |
| 363 | 'gemini-2.5-pro-preview-03-25', | 363 | 'gemini-1.5', |
| 364 | 'gemini-2.5-pro-exp-03-25', | 364 | 'gemini-2.0', |
| 365 | 'gemini-2.0-pro-exp', | 365 | 'gemini-2.5', |
| 366 | 'gemini-2.0-pro-exp-02-05', | ||
| 367 | 'gemini-2.5-flash-preview-04-17', | ||
| 368 | 'gemini-2.0-flash-lite-preview', | ||
| 369 | 'gemini-2.0-flash-lite-preview-02-05', | ||
| 370 | 'gemini-2.0-flash', | ||
| 371 | 'gemini-2.0-flash-001', | ||
| 372 | 'gemini-2.0-flash-thinking-exp', | ||
| 373 | 'gemini-2.0-flash-thinking-exp-01-21', | ||
| 374 | 'gemini-2.0-flash-thinking-exp-1219', | ||
| 375 | 'gemini-2.0-flash-exp', | ||
| 376 | 'gemini-2.0-flash-exp-image-generation', | ||
| 377 | 'gemini-1.5-flash', | ||
| 378 | 'gemini-1.5-flash-latest', | ||
| 379 | 'gemini-1.5-flash-001', | ||
| 380 | 'gemini-1.5-flash-002', | ||
| 381 | 'gemini-1.5-flash-exp-0827', | ||
| 382 | 'gemini-1.5-flash-8b', | ||
| 383 | 'gemini-1.5-flash-8b-exp-0827', | ||
| 384 | 'gemini-1.5-flash-8b-exp-0924', | ||
| 385 | 'gemini-exp-1114', | 366 | 'gemini-exp-1114', |
| 386 | 'gemini-exp-1121', | 367 | 'gemini-exp-1121', |
| 387 | 'gemini-exp-1206', | 368 | 'gemini-exp-1206', |
| 388 | 'gemini-1.5-pro', | ||
| 389 | 'gemini-1.5-pro-latest', | ||
| 390 | 'gemini-1.5-pro-001', | ||
| 391 | 'gemini-1.5-pro-002', | ||
| 392 | 'gemini-1.5-pro-exp-0801', | ||
| 393 | 'gemini-1.5-pro-exp-0827', | ||
| 394 | ]; | 369 | ]; |
| 395 | 370 | ||
| 396 | const isMultimodal = visionSupportedModels.includes(model); | 371 | const isMultimodal = visionSupportedModelPrefix.some(prefix => model.startsWith(prefix)); |
| 397 | 372 | ||
| 398 | let sys_prompt = ''; | 373 | let sys_prompt = ''; |
| 399 | if (useSysPrompt) { | 374 | if (useSysPrompt) { |