Support non-function native tools for Gemini * Enable retrieval tool type for VertexAI Gemini endpoints * Apply code suggestion --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>

32bbf4ec10e966d570ba3250a247e5cda8045984

mightytribble <246552901+mightytribble@users.noreply.github.com>

Signed
1 files changed, +4 -0Showing whitespace changes
src/endpoints/backends/chat-completions.js+4 -0
@@ -436,10 +436,14 @@ async function sendMakerSuiteRequest(request, response) {
436 delete tool.function.parameters;436 delete tool.function.parameters;
437 }437 }
438 functionDeclarations.push(tool.function);438 functionDeclarations.push(tool.function);
439 } else if (tool[tool.type]) {
440 tools.push({ [tool.type]: tool[tool.type] });
439 }441 }
440 }442 }
443 if (functionDeclarations.length > 0) {
441 tools.push({ function_declarations: functionDeclarations });444 tools.push({ function_declarations: functionDeclarations });
442 }445 }
446 }
443447
444 if (isThinkingConfigModel(model)) {448 if (isThinkingConfigModel(model)) {
445 const thinkingConfig = { includeThoughts: includeReasoning };449 const thinkingConfig = { includeThoughts: includeReasoning };