Remove model name check in convertGooglePrompt

e621f0d967d94d8c2c984dd7261759fa1c96783d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -13Showing whitespace changes
src/prompt-converters.js+3 -13
@@ -362,22 +362,12 @@ export function convertCohereMessages(messages, names) {
362362/**
363363 * Convert a prompt from the ChatML objects to the format used by Google MakerSuite models.
364364 * @param {object[]} messages Array of messages
365365 * @param {string} model_model Model name
366366 * @param {boolean} useSysPrompt Use system prompt
367367 * @param {PromptNames} names Prompt names
368368 * @returns {{contents: *[], system_instruction: {parts: {text: string}[]}}} Prompt for Google MakerSuite models
369369 */
370370export function convertGooglePrompt(messages, model_model, useSysPrompt, names) {
371- const visionSupportedModelPrefix = [
372- 'gemini-1.5',
373- 'gemini-2.0',
374- 'gemini-2.5',
375- 'gemini-exp-1114',
376- 'gemini-exp-1121',
377- 'gemini-exp-1206',
378- ];
379-
380- const isMultimodal = visionSupportedModelPrefix.some(prefix => model.startsWith(prefix));
381371 const sysPrompt = [];
382372
383373 if (useSysPrompt) {
@@ -477,7 +467,7 @@ export function convertGooglePrompt(messages, model, useSysPrompt, names) {
477467
478468 toolNameMap[toolCall.id] = toolCall.function.name;
479469 });
480470 } else if (part.type === 'image_url' && isMultimodal) {
481471 const mimeType = part.image_url.url.split(';')[0].split(':')[1];
482472 const base64Data = part.image_url.url.split(',')[1];
483473 parts.push({