Exclude LearnLM from web search
| @@ -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'); | ||
| 348 | 349 | ||
| 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. |
| 394 | 395 | ||
| 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: {} }); |