@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.
@@ -648,7 +648,8 @@ import {
648
648
  function prepareTools({
649
649
  tools,
650
650
  toolChoice,
651
- modelId
651
+ modelId,
652
+ isVertexProvider = false
652
653
  }) {
653
654
  var _a, _b;
654
655
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
@@ -784,7 +785,9 @@ function prepareTools({
784
785
  }
785
786
  const combinedToolConfig = {
786
787
  functionCallingConfig: { mode: "VALIDATED" },
787
- includeServerSideToolInvocations: true
788
+ ...!isVertexProvider && {
789
+ includeServerSideToolInvocations: true
790
+ }
788
791
  };
789
792
  if (toolChoice != null) {
790
793
  switch (toolChoice.type) {
@@ -1224,7 +1227,8 @@ var GoogleGenerativeAILanguageModel = class {
1224
1227
  } = prepareTools({
1225
1228
  tools,
1226
1229
  toolChoice,
1227
- modelId: this.modelId
1230
+ modelId: this.modelId,
1231
+ isVertexProvider
1228
1232
  });
1229
1233
  const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
1230
1234
  const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {