@ai-sdk/google 3.0.87 → 3.0.89
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 +16 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +2 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/convert-to-google-generative-ai-messages.ts +2 -2
- package/src/google-generative-ai-embedding-model.ts +1 -1
- package/src/interactions/convert-to-google-interactions-input.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 3.0.89
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0952964: Prevent prototype pollution when synchronously parsing provider JSON inputs and expose `secureJsonParse` from provider-utils.
|
|
8
|
+
- f0bfb31: Fix Google embedding batch size to respect the Gemini API limit of 100 requests per batch.
|
|
9
|
+
- Updated dependencies [0952964]
|
|
10
|
+
- @ai-sdk/provider-utils@4.0.36
|
|
11
|
+
|
|
12
|
+
## 3.0.88
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [ea1e95b]
|
|
17
|
+
- @ai-sdk/provider-utils@4.0.35
|
|
18
|
+
|
|
3
19
|
## 3.0.87
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
var import_provider_utils23 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "3.0.
|
|
33
|
+
var VERSION = true ? "3.0.89" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -122,7 +122,7 @@ var googleEmbeddingModelOptions = (0, import_provider_utils2.lazySchema)(
|
|
|
122
122
|
var GoogleGenerativeAIEmbeddingModel = class {
|
|
123
123
|
constructor(modelId, config) {
|
|
124
124
|
this.specificationVersion = "v3";
|
|
125
|
-
this.maxEmbeddingsPerCall =
|
|
125
|
+
this.maxEmbeddingsPerCall = 100;
|
|
126
126
|
this.supportsParallelCalls = true;
|
|
127
127
|
this.modelId = modelId;
|
|
128
128
|
this.config = config;
|
|
@@ -635,7 +635,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
635
635
|
return {
|
|
636
636
|
toolCall: {
|
|
637
637
|
toolType: serverToolType,
|
|
638
|
-
args: typeof part.input === "string" ?
|
|
638
|
+
args: typeof part.input === "string" ? (0, import_provider_utils4.secureJsonParse)(part.input) : part.input,
|
|
639
639
|
id: serverToolCallId
|
|
640
640
|
},
|
|
641
641
|
thoughtSignature: effectiveThoughtSignature
|
|
@@ -4186,7 +4186,7 @@ function compactPromptForPreviousInteraction({
|
|
|
4186
4186
|
}
|
|
4187
4187
|
function safeParseToolArgs(input) {
|
|
4188
4188
|
try {
|
|
4189
|
-
const parsed =
|
|
4189
|
+
const parsed = (0, import_provider_utils16.secureJsonParse)(input);
|
|
4190
4190
|
if (parsed != null && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
4191
4191
|
return parsed;
|
|
4192
4192
|
}
|