@ai-sdk/google 3.0.27 → 3.0.29
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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/google-generative-ai-image-model.ts +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/google",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ai-sdk/provider": "3.0.8",
|
|
40
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
40
|
+
"@ai-sdk/provider-utils": "4.0.15"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "20.17.24",
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
GoogleGenerativeAIImageSettings,
|
|
25
25
|
} from './google-generative-ai-image-settings';
|
|
26
26
|
import { GoogleGenerativeAILanguageModel } from './google-generative-ai-language-model';
|
|
27
|
+
import type { GoogleLanguageModelOptions } from './google-generative-ai-options';
|
|
27
28
|
|
|
28
29
|
interface GoogleGenerativeAIImageModelConfig {
|
|
29
30
|
provider: string;
|
|
@@ -272,9 +273,18 @@ export class GoogleGenerativeAIImageModel implements ImageModelV3 {
|
|
|
272
273
|
providerOptions: {
|
|
273
274
|
google: {
|
|
274
275
|
responseModalities: ['IMAGE'],
|
|
275
|
-
imageConfig: aspectRatio
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
imageConfig: aspectRatio
|
|
277
|
+
? {
|
|
278
|
+
aspectRatio: aspectRatio as NonNullable<
|
|
279
|
+
GoogleLanguageModelOptions['imageConfig']
|
|
280
|
+
>['aspectRatio'],
|
|
281
|
+
}
|
|
282
|
+
: undefined,
|
|
283
|
+
...((providerOptions?.google as Omit<
|
|
284
|
+
GoogleLanguageModelOptions,
|
|
285
|
+
'responseModalities' | 'imageConfig'
|
|
286
|
+
>) ?? {}),
|
|
287
|
+
} satisfies GoogleLanguageModelOptions,
|
|
278
288
|
},
|
|
279
289
|
headers,
|
|
280
290
|
abortSignal,
|