Add another ugli ahh list for no grounding models
| @@ -364,6 +364,7 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 364 | 364 | 'gemini-2.0-flash-exp-image-generation', |
| 365 | 365 | ]; |
| 366 | 366 | |
| 367 | + // These models do not support setting the threshold to OFF at all. | |
| 367 | 368 | const blockNoneModels = [ |
| 368 | 369 | 'gemini-1.5-pro-001', |
| 369 | 370 | 'gemini-1.5-flash-001', |
| @@ -374,6 +375,14 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 374 | 375 | const thinkingBudgetModels = [ |
| 375 | 376 | 'gemini-2.5-flash-preview-04-17', |
| 376 | 377 | ]; |
| 378 | + | |
| 379 | + const noSearchModels = [ | |
| 380 | + 'gemini-2.0-flash-lite', | |
| 381 | + 'gemini-2.0-flash-lite-001', | |
| 382 | + 'gemini-2.0-flash-lite-preview-02-05', | |
| 383 | + 'gemini-1.5-flash-8b-exp-0924', | |
| 384 | + 'gemini-1.5-flash-8b-exp-0827', | |
| 385 | + ]; | |
| 377 | 386 | // #endregion |
| 378 | 387 | |
| 379 | 388 | if (!Array.isArray(generationConfig.stopSequences) || !generationConfig.stopSequences.length) { |
| @@ -391,12 +400,11 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 391 | 400 | const prompt = convertGooglePrompt(request.body.messages, model, useSystemPrompt, getPromptNames(request)); |
| 392 | 401 | let safetySettings = GEMINI_SAFETY; |
| 393 | 402 | |
| 394 | - // These models do not support setting the threshold to OFF at all. | |
| 395 | 403 | if (blockNoneModels.includes(model)) { |
| 396 | 404 | safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'BLOCK_NONE' })); |
| 397 | 405 | } |
| 398 | 406 | |
| 399 | 407 | if (enableWebSearch && !enableImageModality && !isGemma && !isLearnLM && !modelnoSearchModels.includes('gemini-2.0-flash-lite'model)) { |
| 400 | 408 | const searchTool = model.includes('1.5') |
| 401 | 409 | ? ({ google_search_retrieval: {} }) |
| 402 | 410 | : ({ google_search: {} }); |