@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 +13 -0
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +9 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/google-generative-ai-language-model.ts +27 -20
- package/src/google-generative-ai-options.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@ai-sdk/provider-utils";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
|
-
var VERSION = true ? "4.0.0-beta.
|
|
10
|
+
var VERSION = true ? "4.0.0-beta.34" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -885,9 +885,10 @@ var googleLanguageModelOptions = lazySchema4(
|
|
|
885
885
|
/**
|
|
886
886
|
* Optional. When set to true, function call arguments will be streamed
|
|
887
887
|
* incrementally via partialArgs in streaming responses. Only supported
|
|
888
|
-
* on the Vertex AI API (not the Gemini API)
|
|
888
|
+
* on the Vertex AI API (not the Gemini API) and only for Gemini 3+
|
|
889
|
+
* models.
|
|
889
890
|
*
|
|
890
|
-
* @default
|
|
891
|
+
* @default false
|
|
891
892
|
*
|
|
892
893
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
|
|
893
894
|
*/
|
|
@@ -1432,7 +1433,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1432
1433
|
toolChoice,
|
|
1433
1434
|
reasoning,
|
|
1434
1435
|
providerOptions
|
|
1435
|
-
}) {
|
|
1436
|
+
}, { isStreaming = false } = {}) {
|
|
1436
1437
|
var _a, _b;
|
|
1437
1438
|
const warnings = [];
|
|
1438
1439
|
const providerOptionsName = this.config.provider.includes("vertex") ? "vertex" : "google";
|
|
@@ -1488,7 +1489,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1488
1489
|
warnings
|
|
1489
1490
|
});
|
|
1490
1491
|
const thinkingConfig = (googleOptions == null ? void 0 : googleOptions.thinkingConfig) || resolvedThinking ? { ...resolvedThinking, ...googleOptions == null ? void 0 : googleOptions.thinkingConfig } : void 0;
|
|
1491
|
-
const streamFunctionCallArguments = isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a :
|
|
1492
|
+
const streamFunctionCallArguments = isStreaming && isVertexProvider ? (_a = googleOptions == null ? void 0 : googleOptions.streamFunctionCallArguments) != null ? _a : false : void 0;
|
|
1492
1493
|
const toolConfig = googleToolConfig || streamFunctionCallArguments || (googleOptions == null ? void 0 : googleOptions.retrievalConfig) ? {
|
|
1493
1494
|
...googleToolConfig,
|
|
1494
1495
|
...streamFunctionCallArguments && {
|
|
@@ -1726,7 +1727,10 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1726
1727
|
};
|
|
1727
1728
|
}
|
|
1728
1729
|
async doStream(options) {
|
|
1729
|
-
const { args, warnings, providerOptionsName } = await this.getArgs(
|
|
1730
|
+
const { args, warnings, providerOptionsName } = await this.getArgs(
|
|
1731
|
+
options,
|
|
1732
|
+
{ isStreaming: true }
|
|
1733
|
+
);
|
|
1730
1734
|
const headers = combineHeaders2(
|
|
1731
1735
|
await resolve2(this.config.headers),
|
|
1732
1736
|
options.headers
|