Exclude LearnLM from web search

a764e5ce54e942ff5f03a73250621dac6be0d574

cloak1505 <170299980+cloak1505@users.noreply.github.com>

1 files changed, +2 -1Showing whitespace changes
src/endpoints/backends/chat-completions.js+2 -1
@@ -345,6 +345,7 @@ async function sendMakerSuiteRequest(request, response) {
345 const reasoningEffort = String(request.body.reasoning_effort);345 const reasoningEffort = String(request.body.reasoning_effort);
346 const isThinking = model.includes('thinking');346 const isThinking = model.includes('thinking');
347 const isGemma = model.includes('gemma');347 const isGemma = model.includes('gemma');
348 const isLearnLM = model.includes('learnlm');
348349
349 const generationConfig = {350 const generationConfig = {
350 stopSequences: request.body.stop,351 stopSequences: request.body.stop,
@@ -392,7 +393,7 @@ async function sendMakerSuiteRequest(request, response) {
392 }393 }
393 // Most of the other models allow for setting the threshold of filters, except for HARM_CATEGORY_CIVIC_INTEGRITY, to OFF.394 // Most of the other models allow for setting the threshold of filters, except for HARM_CATEGORY_CIVIC_INTEGRITY, to OFF.
394395
395 if (enableWebSearch && !useMultiModal && !isGemma) {396 if (enableWebSearch && !useMultiModal && !isGemma && !isLearnLM) {
396 const searchTool = model.includes('1.5') || model.includes('1.0')397 const searchTool = model.includes('1.5') || model.includes('1.0')
397 ? ({ google_search_retrieval: {} })398 ? ({ google_search_retrieval: {} })
398 : ({ google_search: {} });399 : ({ google_search: {} });