From fc19cf7e99a22e73a10213bf306b96c02a20723f Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Thu, 26 Dec 2024 14:38:48 +0530 Subject: [PATCH] delete nested additionalProperties and alos handle both snake_case and camelCase --- src/providers/google-vertex-ai/chatComplete.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/providers/google-vertex-ai/chatComplete.ts b/src/providers/google-vertex-ai/chatComplete.ts index 49d6da853..6e446daad 100644 --- a/src/providers/google-vertex-ai/chatComplete.ts +++ b/src/providers/google-vertex-ai/chatComplete.ts @@ -270,7 +270,10 @@ export const VertexGoogleChatCompleteConfig: ProviderConfig = { params.tools?.forEach((tool) => { if (tool.type === 'function') { // these are not supported by google + delete tool.function?.parameters?.additional_properties; + delete tool.function?.parameters?.additionalProperties; delete tool.function?.parameters?.properties?.additional_properties; + delete tool.function?.parameters?.properties?.additionalProperties; delete tool.function?.strict; if (tool.function.name === 'googleSearchRetrieval') {