@ai-sdk/google 3.0.68 → 3.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -656,7 +656,8 @@ var import_provider2 = require("@ai-sdk/provider");
656
656
  function prepareTools({
657
657
  tools,
658
658
  toolChoice,
659
- modelId
659
+ modelId,
660
+ isVertexProvider = false
660
661
  }) {
661
662
  var _a, _b;
662
663
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
@@ -792,7 +793,9 @@ function prepareTools({
792
793
  }
793
794
  const combinedToolConfig = {
794
795
  functionCallingConfig: { mode: "VALIDATED" },
795
- includeServerSideToolInvocations: true
796
+ ...!isVertexProvider && {
797
+ includeServerSideToolInvocations: true
798
+ }
796
799
  };
797
800
  if (toolChoice != null) {
798
801
  switch (toolChoice.type) {
@@ -1232,7 +1235,8 @@ var GoogleGenerativeAILanguageModel = class {
1232
1235
  } = prepareTools({
1233
1236
  tools,
1234
1237
  toolChoice,
1235
- modelId: this.modelId
1238
+ modelId: this.modelId,
1239
+ isVertexProvider
1236
1240
  });
1237
1241
  const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
1238
1242
  const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {