@ai-sdk/google 3.0.61 → 3.0.62

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.62
4
+
5
+ ### Patch Changes
6
+
7
+ - 46a3584: fix(google-vertex): don't send streamFunctionCallArguments for unary API calls and change default to false
8
+
3
9
  ## 3.0.61
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
30
30
  var import_provider_utils16 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.61" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.62" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -822,9 +822,10 @@ var googleLanguageModelOptions = (0, import_provider_utils5.lazySchema)(
822
822
  /**
823
823
  * Optional. When set to true, function call arguments will be streamed
824
824
  * incrementally via partialArgs in streaming responses. Only supported
825
- * on the Vertex AI API (not the Gemini API).
825
+ * on the Vertex AI API (not the Gemini API) and only for Gemini 3+
826
+ * models.
826
827
  *
827
- * @default true
828
+ * @default false
828
829
  *
829
830
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
830
831
  */
@@ -1366,7 +1367,7 @@ var GoogleGenerativeAILanguageModel = class {
1366
1367
  tools,
1367
1368
  toolChoice,
1368
1369
  providerOptions
1369
- }) {
1370
+ }, { isStreaming = false } = {}) {
1370
1371
  var _a, _b;
1371
1372
  const warnings = [];
1372
1373
  const providerOptionsName = this.config.provider.includes("vertex") ? "vertex" : "google";
@@ -1416,7 +1417,7 @@ var GoogleGenerativeAILanguageModel = class {
1416
1417
  toolChoice,
1417
1418
  modelId: this.modelId
1418
1419
  });
1419
- const streamFunctionCallArguments = isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : true : void 0;
1420
+ const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
1420
1421
  const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
1421
1422
  ...googleToolConfig,
1422
1423
  ...streamFunctionCallArguments && {
@@ -1655,7 +1656,10 @@ var GoogleGenerativeAILanguageModel = class {
1655
1656
  };
1656
1657
  }
1657
1658
  async doStream(options) {
1658
- const { args, warnings, providerOptionsName } = await this.getArgs(options);
1659
+ const { args, warnings, providerOptionsName } = await this.getArgs(
1660
+ options,
1661
+ { isStreaming: true }
1662
+ );
1659
1663
  const headers = (0, import_provider_utils6.combineHeaders)(
1660
1664
  await (0, import_provider_utils6.resolve)(this.config.headers),
1661
1665
  options.headers