Add another ugli ahh list for no grounding models

7c54a74ffa2f5c47b3f2d3514f1e46f0a1414cde

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

1 files changed, +10 -2Showing whitespace changes
src/endpoints/backends/chat-completions.js+10 -2
@@ -364,6 +364,7 @@ async function sendMakerSuiteRequest(request, response) {
364364 'gemini-2.0-flash-exp-image-generation',
365365 ];
366366
367+ // These models do not support setting the threshold to OFF at all.
367368 const blockNoneModels = [
368369 'gemini-1.5-pro-001',
369370 'gemini-1.5-flash-001',
@@ -374,6 +375,14 @@ async function sendMakerSuiteRequest(request, response) {
374375 const thinkingBudgetModels = [
375376 'gemini-2.5-flash-preview-04-17',
376377 ];
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+ ];
377386 // #endregion
378387
379388 if (!Array.isArray(generationConfig.stopSequences) || !generationConfig.stopSequences.length) {
@@ -391,12 +400,11 @@ async function sendMakerSuiteRequest(request, response) {
391400 const prompt = convertGooglePrompt(request.body.messages, model, useSystemPrompt, getPromptNames(request));
392401 let safetySettings = GEMINI_SAFETY;
393402
394- // These models do not support setting the threshold to OFF at all.
395403 if (blockNoneModels.includes(model)) {
396404 safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'BLOCK_NONE' }));
397405 }
398406
399407 if (enableWebSearch && !enableImageModality && !isGemma && !isLearnLM && !modelnoSearchModels.includes('gemini-2.0-flash-lite'model)) {
400408 const searchTool = model.includes('1.5')
401409 ? ({ google_search_retrieval: {} })
402410 : ({ google_search: {} });