@ai-sdk/google 3.0.0-beta.50 → 3.0.0-beta.52
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 +12 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +7 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +7 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fff8d59: feat(provider/google): Add support for the imageSize provider option
|
|
8
|
+
|
|
9
|
+
## 3.0.0-beta.51
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8370068: fix(provider/google): preserve thoughtSignature through tool execution
|
|
14
|
+
|
|
3
15
|
## 3.0.0-beta.50
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -31,6 +31,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
|
|
|
31
31
|
mediaResolution?: "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | undefined;
|
|
32
32
|
imageConfig?: {
|
|
33
33
|
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
34
|
+
imageSize?: "1K" | "2K" | "4K" | undefined;
|
|
34
35
|
} | undefined;
|
|
35
36
|
}>;
|
|
36
37
|
type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
|
|
|
31
31
|
mediaResolution?: "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | undefined;
|
|
32
32
|
imageConfig?: {
|
|
33
33
|
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
34
|
+
imageSize?: "1K" | "2K" | "4K" | undefined;
|
|
34
35
|
} | undefined;
|
|
35
36
|
}>;
|
|
36
37
|
type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>;
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
30
30
|
var import_provider_utils13 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "3.0.0-beta.
|
|
33
|
+
var VERSION = true ? "3.0.0-beta.52" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -355,19 +355,20 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
355
355
|
contents.push({
|
|
356
356
|
role: "model",
|
|
357
357
|
parts: content.map((part) => {
|
|
358
|
-
var _a2, _b2, _c
|
|
358
|
+
var _a2, _b2, _c;
|
|
359
|
+
const thoughtSignature = ((_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.google) == null ? void 0 : _b2.thoughtSignature) != null ? String((_c = part.providerOptions.google) == null ? void 0 : _c.thoughtSignature) : void 0;
|
|
359
360
|
switch (part.type) {
|
|
360
361
|
case "text": {
|
|
361
362
|
return part.text.length === 0 ? void 0 : {
|
|
362
363
|
text: part.text,
|
|
363
|
-
thoughtSignature
|
|
364
|
+
thoughtSignature
|
|
364
365
|
};
|
|
365
366
|
}
|
|
366
367
|
case "reasoning": {
|
|
367
368
|
return part.text.length === 0 ? void 0 : {
|
|
368
369
|
text: part.text,
|
|
369
370
|
thought: true,
|
|
370
|
-
thoughtSignature
|
|
371
|
+
thoughtSignature
|
|
371
372
|
};
|
|
372
373
|
}
|
|
373
374
|
case "file": {
|
|
@@ -394,7 +395,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
394
395
|
name: part.toolName,
|
|
395
396
|
args: part.input
|
|
396
397
|
},
|
|
397
|
-
thoughtSignature
|
|
398
|
+
thoughtSignature
|
|
398
399
|
};
|
|
399
400
|
}
|
|
400
401
|
}
|
|
@@ -573,7 +574,8 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
|
|
|
573
574
|
"9:16",
|
|
574
575
|
"16:9",
|
|
575
576
|
"21:9"
|
|
576
|
-
]).optional()
|
|
577
|
+
]).optional(),
|
|
578
|
+
imageSize: import_v44.z.enum(["1K", "2K", "4K"]).optional()
|
|
577
579
|
}).optional()
|
|
578
580
|
})
|
|
579
581
|
)
|