@ai-sdk/google 3.0.27 → 3.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/google",
3
- "version": "3.0.27",
3
+ "version": "3.0.28",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -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 ? { aspectRatio } : undefined,
276
- ...((providerOptions?.google as Record<string, unknown>) ?? {}),
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,