From a764e5ce54e942ff5f03a73250621dac6be0d574 Mon Sep 17 00:00:00 2001 From: cloak1505 <170299980+cloak1505@users.noreply.github.com> Date: Sat, 26 Apr 2025 12:51:26 -0500 Subject: [PATCH] Exclude LearnLM from web search --- src/endpoints/backends/chat-completions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index c3ad8debe..a96b78889 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -345,6 +345,7 @@ async function sendMakerSuiteRequest(request, response) { const reasoningEffort = String(request.body.reasoning_effort); const isThinking = model.includes('thinking'); const isGemma = model.includes('gemma'); + const isLearnLM = model.includes('learnlm'); const generationConfig = { stopSequences: request.body.stop, @@ -392,7 +393,7 @@ async function sendMakerSuiteRequest(request, response) { } // Most of the other models allow for setting the threshold of filters, except for HARM_CATEGORY_CIVIC_INTEGRITY, to OFF. - if (enableWebSearch && !useMultiModal && !isGemma) { + if (enableWebSearch && !useMultiModal && !isGemma && !isLearnLM) { const searchTool = model.includes('1.5') || model.includes('1.0') ? ({ google_search_retrieval: {} }) : ({ google_search: {} });