@ai-sdk/google 4.0.0-beta.32 → 4.0.0-beta.34

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,18 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.0-beta.34
4
+
5
+ ### Patch Changes
6
+
7
+ - 5b7e7c2: fix(google-vertex): don't send streamFunctionCallArguments for unary API calls and change default to false
8
+
9
+ ## 4.0.0-beta.33
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [3ae1786]
14
+ - @ai-sdk/provider-utils@5.0.0-beta.17
15
+
3
16
  ## 4.0.0-beta.32
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
30
30
  var import_provider_utils17 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "4.0.0-beta.32" : "0.0.0-test";
33
+ var VERSION = true ? "4.0.0-beta.34" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -872,9 +872,10 @@ var googleLanguageModelOptions = (0, import_provider_utils5.lazySchema)(
872
872
  /**
873
873
  * Optional. When set to true, function call arguments will be streamed
874
874
  * incrementally via partialArgs in streaming responses. Only supported
875
- * on the Vertex AI API (not the Gemini API).
875
+ * on the Vertex AI API (not the Gemini API) and only for Gemini 3+
876
+ * models.
876
877
  *
877
- * @default true
878
+ * @default false
878
879
  *
879
880
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
880
881
  */
@@ -1417,7 +1418,7 @@ var GoogleGenerativeAILanguageModel = class {
1417
1418
  toolChoice,
1418
1419
  reasoning,
1419
1420
  providerOptions
1420
- }) {
1421
+ }, { isStreaming = false } = {}) {
1421
1422
  var _a, _b;
1422
1423
  const warnings = [];
1423
1424
  const providerOptionsName = this.config.provider.includes("vertex") ? "vertex" : "google";
@@ -1473,7 +1474,7 @@ var GoogleGenerativeAILanguageModel = class {
1473
1474
  warnings
1474
1475
  });
1475
1476
  const thinkingConfig = (googleOptions == null ? void 0 : googleOptions.thinkingConfig) || resolvedThinking ? { ...resolvedThinking, ...googleOptions == null ? void 0 : googleOptions.thinkingConfig } : void 0;
1476
- const streamFunctionCallArguments = isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : true : void 0;
1477
+ const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
1477
1478
  const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
1478
1479
  ...googleToolConfig,
1479
1480
  ...streamFunctionCallArguments && {
@@ -1711,7 +1712,10 @@ var GoogleGenerativeAILanguageModel = class {
1711
1712
  };
1712
1713
  }
1713
1714
  async doStream(options) {
1714
- const { args, warnings, providerOptionsName } = await this.getArgs(options);
1715
+ const { args, warnings, providerOptionsName } = await this.getArgs(
1716
+ options,
1717
+ { isStreaming: true }
1718
+ );
1715
1719
  const headers = (0, import_provider_utils6.combineHeaders)(
1716
1720
  await (0, import_provider_utils6.resolve)(this.config.headers),
1717
1721
  options.headers