@ai-sdk/google 2.0.19 → 2.0.21

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/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 ? "2.0.19" : "0.0.0-test";
10
+ var VERSION = true ? "2.0.21" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -22,7 +22,7 @@ import {
22
22
  resolve,
23
23
  zodSchema as zodSchema3
24
24
  } from "@ai-sdk/provider-utils";
25
- import * as z3 from "zod/v4";
25
+ import { z as z3 } from "zod/v4";
26
26
 
27
27
  // src/google-error.ts
28
28
  import {
@@ -30,7 +30,7 @@ import {
30
30
  lazySchema,
31
31
  zodSchema
32
32
  } from "@ai-sdk/provider-utils";
33
- import * as z from "zod/v4";
33
+ import { z } from "zod/v4";
34
34
  var googleErrorDataSchema = lazySchema(
35
35
  () => zodSchema(
36
36
  z.object({
@@ -52,7 +52,7 @@ import {
52
52
  lazySchema as lazySchema2,
53
53
  zodSchema as zodSchema2
54
54
  } from "@ai-sdk/provider-utils";
55
- import * as z2 from "zod/v4";
55
+ import { z as z2 } from "zod/v4";
56
56
  var googleGenerativeAIEmbeddingProviderOptions = lazySchema2(
57
57
  () => zodSchema2(
58
58
  z2.object({
@@ -207,7 +207,7 @@ import {
207
207
  resolve as resolve2,
208
208
  zodSchema as zodSchema5
209
209
  } from "@ai-sdk/provider-utils";
210
- import * as z5 from "zod/v4";
210
+ import { z as z5 } from "zod/v4";
211
211
 
212
212
  // src/convert-json-schema-to-openapi-schema.ts
213
213
  function convertJSONSchemaToOpenAPISchema(jsonSchema) {
@@ -485,7 +485,7 @@ import {
485
485
  lazySchema as lazySchema4,
486
486
  zodSchema as zodSchema4
487
487
  } from "@ai-sdk/provider-utils";
488
- import * as z4 from "zod/v4";
488
+ import { z as z4 } from "zod/v4";
489
489
  var googleGenerativeAIProviderOptions = lazySchema4(
490
490
  () => zodSchema4(
491
491
  z4.object({
@@ -562,7 +562,26 @@ var googleGenerativeAIProviderOptions = lazySchema4(
562
562
  "MEDIA_RESOLUTION_LOW",
563
563
  "MEDIA_RESOLUTION_MEDIUM",
564
564
  "MEDIA_RESOLUTION_HIGH"
565
- ]).optional()
565
+ ]).optional(),
566
+ /**
567
+ * Optional. Configures the image generation aspect ratio for Gemini models.
568
+ *
569
+ * https://ai.google.dev/gemini-api/docs/image-generation#aspect_ratios
570
+ */
571
+ imageConfig: z4.object({
572
+ aspectRatio: z4.enum([
573
+ "1:1",
574
+ "2:3",
575
+ "3:2",
576
+ "3:4",
577
+ "4:3",
578
+ "4:5",
579
+ "5:4",
580
+ "9:16",
581
+ "16:9",
582
+ "21:9"
583
+ ]).optional()
584
+ }).optional()
566
585
  })
567
586
  )
568
587
  );
@@ -819,7 +838,10 @@ var GoogleGenerativeAILanguageModel = class {
819
838
  },
820
839
  // provider options:
821
840
  responseModalities: googleOptions == null ? void 0 : googleOptions.responseModalities,
822
- thinkingConfig: googleOptions == null ? void 0 : googleOptions.thinkingConfig
841
+ thinkingConfig: googleOptions == null ? void 0 : googleOptions.thinkingConfig,
842
+ ...(googleOptions == null ? void 0 : googleOptions.imageConfig) && {
843
+ imageConfig: googleOptions.imageConfig
844
+ }
823
845
  },
824
846
  contents,
825
847
  systemInstruction: isGemmaModel ? void 0 : systemInstruction,
@@ -1360,7 +1382,7 @@ var chunkSchema = lazySchema5(
1360
1382
 
1361
1383
  // src/tool/code-execution.ts
1362
1384
  import { createProviderDefinedToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
1363
- import * as z6 from "zod/v4";
1385
+ import { z as z6 } from "zod/v4";
1364
1386
  var codeExecution = createProviderDefinedToolFactoryWithOutputSchema({
1365
1387
  id: "google.code_execution",
1366
1388
  name: "code_execution",
@@ -1380,7 +1402,7 @@ import {
1380
1402
  lazySchema as lazySchema6,
1381
1403
  zodSchema as zodSchema6
1382
1404
  } from "@ai-sdk/provider-utils";
1383
- import * as z7 from "zod/v4";
1405
+ import { z as z7 } from "zod/v4";
1384
1406
  var googleSearch = createProviderDefinedToolFactory({
1385
1407
  id: "google.google_search",
1386
1408
  name: "google_search",
@@ -1400,7 +1422,7 @@ import {
1400
1422
  lazySchema as lazySchema7,
1401
1423
  zodSchema as zodSchema7
1402
1424
  } from "@ai-sdk/provider-utils";
1403
- import * as z8 from "zod/v4";
1425
+ import { z as z8 } from "zod/v4";
1404
1426
  var urlContext = createProviderDefinedToolFactory2({
1405
1427
  id: "google.url_context",
1406
1428
  name: "url_context",
@@ -1442,7 +1464,7 @@ import {
1442
1464
  resolve as resolve3,
1443
1465
  zodSchema as zodSchema8
1444
1466
  } from "@ai-sdk/provider-utils";
1445
- import * as z9 from "zod/v4";
1467
+ import { z as z9 } from "zod/v4";
1446
1468
  var GoogleGenerativeAIImageModel = class {
1447
1469
  constructor(modelId, settings, config) {
1448
1470
  this.modelId = modelId;