@ai-sdk/openai 2.0.135 → 2.0.136

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.
@@ -14,8 +14,12 @@ import {
14
14
 
15
15
  // src/openai-error.ts
16
16
  import { z } from "zod/v4";
17
- import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
18
- var openaiErrorDataSchema = z.object({
17
+ import {
18
+ lazySchema,
19
+ zodSchema,
20
+ createJsonErrorResponseHandler
21
+ } from "@ai-sdk/provider-utils";
22
+ var openaiErrorDataSchema = () => z.object({
19
23
  error: z.object({
20
24
  message: z.string(),
21
25
  // The additional information below is handled loosely to support
@@ -26,8 +30,11 @@ var openaiErrorDataSchema = z.object({
26
30
  code: z.union([z.string(), z.number()]).nullish()
27
31
  })
28
32
  });
33
+ var openaiErrorDataSchemaValidator = lazySchema(
34
+ () => zodSchema(openaiErrorDataSchema())
35
+ );
29
36
  var openaiFailedResponseHandler = createJsonErrorResponseHandler({
30
- errorSchema: openaiErrorDataSchema,
37
+ errorSchema: openaiErrorDataSchemaValidator,
31
38
  errorToMessage: (data) => data.error.message
32
39
  });
33
40
 
@@ -360,11 +367,11 @@ function mapOpenAIFinishReason(finishReason) {
360
367
  // src/chat/openai-chat-api.ts
361
368
  import {
362
369
  lazyValidator,
363
- zodSchema
370
+ zodSchema as zodSchema2
364
371
  } from "@ai-sdk/provider-utils";
365
372
  import { z as z2 } from "zod/v4";
366
373
  var openaiChatResponseSchema = lazyValidator(
367
- () => zodSchema(
374
+ () => zodSchema2(
368
375
  z2.object({
369
376
  id: z2.string().nullish(),
370
377
  created: z2.number().nullish(),
@@ -435,7 +442,7 @@ var openaiChatResponseSchema = lazyValidator(
435
442
  )
436
443
  );
437
444
  var openaiChatChunkSchema = lazyValidator(
438
- () => zodSchema(
445
+ () => zodSchema2(
439
446
  z2.union([
440
447
  z2.object({
441
448
  id: z2.string().nullish(),
@@ -502,7 +509,7 @@ var openaiChatChunkSchema = lazyValidator(
502
509
  }).nullish()
503
510
  }).nullish()
504
511
  }),
505
- openaiErrorDataSchema
512
+ openaiErrorDataSchema()
506
513
  ])
507
514
  )
508
515
  );
@@ -510,11 +517,11 @@ var openaiChatChunkSchema = lazyValidator(
510
517
  // src/chat/openai-chat-options.ts
511
518
  import {
512
519
  lazyValidator as lazyValidator2,
513
- zodSchema as zodSchema2
520
+ zodSchema as zodSchema3
514
521
  } from "@ai-sdk/provider-utils";
515
522
  import { z as z3 } from "zod/v4";
516
523
  var openaiChatLanguageModelOptions = lazyValidator2(
517
- () => zodSchema2(
524
+ () => zodSchema3(
518
525
  z3.object({
519
526
  /**
520
527
  * Modify the likelihood of specified tokens appearing in the completion.
@@ -1270,10 +1277,10 @@ function mapOpenAIFinishReason2(finishReason) {
1270
1277
  import { z as z4 } from "zod/v4";
1271
1278
  import {
1272
1279
  lazyValidator as lazyValidator3,
1273
- zodSchema as zodSchema3
1280
+ zodSchema as zodSchema4
1274
1281
  } from "@ai-sdk/provider-utils";
1275
1282
  var openaiCompletionResponseSchema = lazyValidator3(
1276
- () => zodSchema3(
1283
+ () => zodSchema4(
1277
1284
  z4.object({
1278
1285
  id: z4.string().nullish(),
1279
1286
  created: z4.number().nullish(),
@@ -1298,7 +1305,7 @@ var openaiCompletionResponseSchema = lazyValidator3(
1298
1305
  )
1299
1306
  );
1300
1307
  var openaiCompletionChunkSchema = lazyValidator3(
1301
- () => zodSchema3(
1308
+ () => zodSchema4(
1302
1309
  z4.union([
1303
1310
  z4.object({
1304
1311
  id: z4.string().nullish(),
@@ -1322,7 +1329,7 @@ var openaiCompletionChunkSchema = lazyValidator3(
1322
1329
  total_tokens: z4.number()
1323
1330
  }).nullish()
1324
1331
  }),
1325
- openaiErrorDataSchema
1332
+ openaiErrorDataSchema()
1326
1333
  ])
1327
1334
  )
1328
1335
  );
@@ -1330,11 +1337,11 @@ var openaiCompletionChunkSchema = lazyValidator3(
1330
1337
  // src/completion/openai-completion-options.ts
1331
1338
  import {
1332
1339
  lazyValidator as lazyValidator4,
1333
- zodSchema as zodSchema4
1340
+ zodSchema as zodSchema5
1334
1341
  } from "@ai-sdk/provider-utils";
1335
1342
  import { z as z5 } from "zod/v4";
1336
1343
  var openaiCompletionProviderOptions = lazyValidator4(
1337
- () => zodSchema4(
1344
+ () => zodSchema5(
1338
1345
  z5.object({
1339
1346
  /**
1340
1347
  Echo back the prompt in addition to the completion.
@@ -1623,11 +1630,11 @@ import {
1623
1630
  // src/embedding/openai-embedding-options.ts
1624
1631
  import {
1625
1632
  lazyValidator as lazyValidator5,
1626
- zodSchema as zodSchema5
1633
+ zodSchema as zodSchema6
1627
1634
  } from "@ai-sdk/provider-utils";
1628
1635
  import { z as z6 } from "zod/v4";
1629
1636
  var openaiEmbeddingProviderOptions = lazyValidator5(
1630
- () => zodSchema5(
1637
+ () => zodSchema6(
1631
1638
  z6.object({
1632
1639
  /**
1633
1640
  The number of dimensions the resulting output embeddings should have.
@@ -1644,10 +1651,10 @@ var openaiEmbeddingProviderOptions = lazyValidator5(
1644
1651
  );
1645
1652
 
1646
1653
  // src/embedding/openai-embedding-api.ts
1647
- import { lazyValidator as lazyValidator6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
1654
+ import { lazyValidator as lazyValidator6, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
1648
1655
  import { z as z7 } from "zod/v4";
1649
1656
  var openaiTextEmbeddingResponseSchema = lazyValidator6(
1650
- () => zodSchema6(
1657
+ () => zodSchema7(
1651
1658
  z7.object({
1652
1659
  data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
1653
1660
  usage: z7.object({ prompt_tokens: z7.number() }).nullish()
@@ -1731,10 +1738,10 @@ import {
1731
1738
  } from "@ai-sdk/provider-utils";
1732
1739
 
1733
1740
  // src/image/openai-image-api.ts
1734
- import { lazyValidator as lazyValidator7, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
1741
+ import { lazyValidator as lazyValidator7, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
1735
1742
  import { z as z8 } from "zod/v4";
1736
1743
  var openaiImageResponseSchema = lazyValidator7(
1737
- () => zodSchema7(
1744
+ () => zodSchema8(
1738
1745
  z8.object({
1739
1746
  created: z8.number().nullish(),
1740
1747
  data: z8.array(
@@ -1763,7 +1770,7 @@ var openaiImageResponseSchema = lazyValidator7(
1763
1770
  // src/image/openai-image-options.ts
1764
1771
  import {
1765
1772
  lazyValidator as lazyValidator8,
1766
- zodSchema as zodSchema8
1773
+ zodSchema as zodSchema9
1767
1774
  } from "@ai-sdk/provider-utils";
1768
1775
  import { z as z9 } from "zod/v4";
1769
1776
  var modelMaxImagesPerCall = {
@@ -1784,7 +1791,7 @@ function getMaxImagesPerCall(modelId) {
1784
1791
  var _a2;
1785
1792
  return (_a2 = modelMaxImagesPerCall[modelId]) != null ? _a2 : modelId.startsWith("gpt-image-") ? 10 : 1;
1786
1793
  }
1787
- var baseImageModelOptionsObject = z9.object({
1794
+ var baseImageModelOptionsObject = () => z9.object({
1788
1795
  /**
1789
1796
  * Quality of the generated image(s).
1790
1797
  *
@@ -1814,11 +1821,11 @@ var baseImageModelOptionsObject = z9.object({
1814
1821
  user: z9.string().optional()
1815
1822
  });
1816
1823
  var openaiImageModelOptions = lazyValidator8(
1817
- () => zodSchema8(baseImageModelOptionsObject)
1824
+ () => zodSchema9(baseImageModelOptionsObject())
1818
1825
  );
1819
1826
  var openaiImageModelGenerationOptions = lazyValidator8(
1820
- () => zodSchema8(
1821
- baseImageModelOptionsObject.extend({
1827
+ () => zodSchema9(
1828
+ baseImageModelOptionsObject().extend({
1822
1829
  /**
1823
1830
  * Style of the generated image. `vivid` produces hyper-real and
1824
1831
  * dramatic images; `natural` produces more subdued, less hyper-real
@@ -1970,10 +1977,10 @@ import {
1970
1977
  } from "@ai-sdk/provider-utils";
1971
1978
 
1972
1979
  // src/transcription/openai-transcription-api.ts
1973
- import { lazyValidator as lazyValidator9, zodSchema as zodSchema9 } from "@ai-sdk/provider-utils";
1980
+ import { lazyValidator as lazyValidator9, zodSchema as zodSchema10 } from "@ai-sdk/provider-utils";
1974
1981
  import { z as z10 } from "zod/v4";
1975
1982
  var openaiTranscriptionResponseSchema = lazyValidator9(
1976
- () => zodSchema9(
1983
+ () => zodSchema10(
1977
1984
  z10.object({
1978
1985
  text: z10.string(),
1979
1986
  language: z10.string().nullish(),
@@ -2006,11 +2013,11 @@ var openaiTranscriptionResponseSchema = lazyValidator9(
2006
2013
  // src/transcription/openai-transcription-options.ts
2007
2014
  import {
2008
2015
  lazyValidator as lazyValidator10,
2009
- zodSchema as zodSchema10
2016
+ zodSchema as zodSchema11
2010
2017
  } from "@ai-sdk/provider-utils";
2011
2018
  import { z as z11 } from "zod/v4";
2012
2019
  var openAITranscriptionProviderOptions = lazyValidator10(
2013
- () => zodSchema10(
2020
+ () => zodSchema11(
2014
2021
  z11.object({
2015
2022
  /**
2016
2023
  * Additional information to include in the transcription response.
@@ -2216,11 +2223,11 @@ import {
2216
2223
  // src/speech/openai-speech-options.ts
2217
2224
  import {
2218
2225
  lazyValidator as lazyValidator11,
2219
- zodSchema as zodSchema11
2226
+ zodSchema as zodSchema12
2220
2227
  } from "@ai-sdk/provider-utils";
2221
2228
  import { z as z12 } from "zod/v4";
2222
2229
  var openaiSpeechProviderOptionsSchema = lazyValidator11(
2223
- () => zodSchema11(
2230
+ () => zodSchema12(
2224
2231
  z12.object({
2225
2232
  instructions: z12.string().nullish(),
2226
2233
  speed: z12.number().min(0.25).max(4).default(1).nullish()
@@ -2348,6 +2355,8 @@ import {
2348
2355
  UnsupportedFunctionalityError as UnsupportedFunctionalityError4
2349
2356
  } from "@ai-sdk/provider";
2350
2357
  import {
2358
+ lazySchema as lazySchema4,
2359
+ zodSchema as zodSchema16,
2351
2360
  convertToBase64 as convertToBase642,
2352
2361
  parseProviderOptions as parseProviderOptions7,
2353
2362
  safeValidateTypes,
@@ -2358,7 +2367,7 @@ import { z as z16 } from "zod/v4";
2358
2367
  // src/responses/openai-responses-options.ts
2359
2368
  import {
2360
2369
  lazyValidator as lazyValidator12,
2361
- zodSchema as zodSchema12
2370
+ zodSchema as zodSchema13
2362
2371
  } from "@ai-sdk/provider-utils";
2363
2372
  import { z as z13 } from "zod/v4";
2364
2373
  var TOP_LOGPROBS_MAX = 20;
@@ -2451,7 +2460,7 @@ var openaiResponsesModelIds = [
2451
2460
  ...openaiResponsesReasoningModelIds
2452
2461
  ];
2453
2462
  var openaiResponsesProviderOptionsSchema = lazyValidator12(
2454
- () => zodSchema12(
2463
+ () => zodSchema13(
2455
2464
  z13.object({
2456
2465
  conversation: z13.string().nullish(),
2457
2466
  include: z13.array(
@@ -2545,7 +2554,7 @@ var openaiResponsesProviderOptionsSchema = lazyValidator12(
2545
2554
  )
2546
2555
  );
2547
2556
  var openaiResponsesSystemMessageOptionsSchema = lazyValidator12(
2548
- () => zodSchema12(
2557
+ () => zodSchema13(
2549
2558
  z13.object({
2550
2559
  /**
2551
2560
  * Emit a configuration update at this position in Responses history.
@@ -2563,12 +2572,12 @@ var openaiResponsesSystemMessageOptionsSchema = lazyValidator12(
2563
2572
  // src/tool/local-shell.ts
2564
2573
  import {
2565
2574
  createProviderDefinedToolFactoryWithOutputSchema,
2566
- lazySchema,
2567
- zodSchema as zodSchema13
2575
+ lazySchema as lazySchema2,
2576
+ zodSchema as zodSchema14
2568
2577
  } from "@ai-sdk/provider-utils";
2569
2578
  import { z as z14 } from "zod/v4";
2570
- var localShellInputSchema = lazySchema(
2571
- () => zodSchema13(
2579
+ var localShellInputSchema = lazySchema2(
2580
+ () => zodSchema14(
2572
2581
  z14.object({
2573
2582
  action: z14.object({
2574
2583
  type: z14.literal("exec"),
@@ -2581,8 +2590,8 @@ var localShellInputSchema = lazySchema(
2581
2590
  })
2582
2591
  )
2583
2592
  );
2584
- var localShellOutputSchema = lazySchema(
2585
- () => zodSchema13(z14.object({ output: z14.string() }))
2593
+ var localShellOutputSchema = lazySchema2(
2594
+ () => zodSchema14(z14.object({ output: z14.string() }))
2586
2595
  );
2587
2596
  var localShell = createProviderDefinedToolFactoryWithOutputSchema({
2588
2597
  id: "openai.local_shell",
@@ -2594,12 +2603,12 @@ var localShell = createProviderDefinedToolFactoryWithOutputSchema({
2594
2603
  // src/tool/web-search.ts
2595
2604
  import {
2596
2605
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
2597
- lazySchema as lazySchema2,
2598
- zodSchema as zodSchema14
2606
+ lazySchema as lazySchema3,
2607
+ zodSchema as zodSchema15
2599
2608
  } from "@ai-sdk/provider-utils";
2600
2609
  import { z as z15 } from "zod/v4";
2601
- var webSearchArgsSchema = lazySchema2(
2602
- () => zodSchema14(
2610
+ var webSearchArgsSchema = lazySchema3(
2611
+ () => zodSchema15(
2603
2612
  z15.object({
2604
2613
  externalWebAccess: z15.boolean().optional(),
2605
2614
  filters: z15.object({
@@ -2617,9 +2626,9 @@ var webSearchArgsSchema = lazySchema2(
2617
2626
  })
2618
2627
  )
2619
2628
  );
2620
- var webSearchInputSchema = lazySchema2(() => zodSchema14(z15.object({})));
2621
- var webSearchOutputSchema = lazySchema2(
2622
- () => zodSchema14(
2629
+ var webSearchInputSchema = lazySchema3(() => zodSchema15(z15.object({})));
2630
+ var webSearchOutputSchema = lazySchema3(
2631
+ () => zodSchema15(
2623
2632
  z15.object({
2624
2633
  action: z15.discriminatedUnion("type", [
2625
2634
  z15.object({
@@ -3121,10 +3130,14 @@ async function convertToOpenAIResponsesInput({
3121
3130
  }
3122
3131
  return { input, warnings };
3123
3132
  }
3124
- var openaiResponsesReasoningProviderOptionsSchema = z16.object({
3125
- itemId: z16.string().nullish(),
3126
- reasoningEncryptedContent: z16.string().nullish()
3127
- });
3133
+ var openaiResponsesReasoningProviderOptionsSchema = lazySchema4(
3134
+ () => zodSchema16(
3135
+ z16.object({
3136
+ itemId: z16.string().nullish(),
3137
+ reasoningEncryptedContent: z16.string().nullish()
3138
+ })
3139
+ )
3140
+ );
3128
3141
 
3129
3142
  // src/responses/map-openai-responses-finish-reason.ts
3130
3143
  function mapOpenAIResponseFinishReason({
@@ -3147,11 +3160,11 @@ function mapOpenAIResponseFinishReason({
3147
3160
  // src/responses/openai-responses-api.ts
3148
3161
  import {
3149
3162
  lazyValidator as lazyValidator13,
3150
- zodSchema as zodSchema15
3163
+ zodSchema as zodSchema17
3151
3164
  } from "@ai-sdk/provider-utils";
3152
3165
  import { z as z17 } from "zod/v4";
3153
3166
  var openaiResponsesChunkSchema = lazyValidator13(
3154
- () => zodSchema15(
3167
+ () => zodSchema17(
3155
3168
  z17.union([
3156
3169
  z17.object({
3157
3170
  type: z17.literal("response.output_text.delta"),
@@ -3438,7 +3451,7 @@ var openaiResponsesChunkSchema = lazyValidator13(
3438
3451
  )
3439
3452
  );
3440
3453
  var openaiResponsesResponseSchema = lazyValidator13(
3441
- () => zodSchema15(
3454
+ () => zodSchema17(
3442
3455
  z17.object({
3443
3456
  id: z17.string().optional(),
3444
3457
  created_at: z17.number().optional(),
@@ -3642,20 +3655,20 @@ import {
3642
3655
  // src/tool/code-interpreter.ts
3643
3656
  import {
3644
3657
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
3645
- lazySchema as lazySchema3,
3646
- zodSchema as zodSchema16
3658
+ lazySchema as lazySchema5,
3659
+ zodSchema as zodSchema18
3647
3660
  } from "@ai-sdk/provider-utils";
3648
3661
  import { z as z18 } from "zod/v4";
3649
- var codeInterpreterInputSchema = lazySchema3(
3650
- () => zodSchema16(
3662
+ var codeInterpreterInputSchema = lazySchema5(
3663
+ () => zodSchema18(
3651
3664
  z18.object({
3652
3665
  code: z18.string().nullish(),
3653
3666
  containerId: z18.string()
3654
3667
  })
3655
3668
  )
3656
3669
  );
3657
- var codeInterpreterOutputSchema = lazySchema3(
3658
- () => zodSchema16(
3670
+ var codeInterpreterOutputSchema = lazySchema5(
3671
+ () => zodSchema18(
3659
3672
  z18.object({
3660
3673
  outputs: z18.array(
3661
3674
  z18.discriminatedUnion("type", [
@@ -3666,8 +3679,8 @@ var codeInterpreterOutputSchema = lazySchema3(
3666
3679
  })
3667
3680
  )
3668
3681
  );
3669
- var codeInterpreterArgsSchema = lazySchema3(
3670
- () => zodSchema16(
3682
+ var codeInterpreterArgsSchema = lazySchema5(
3683
+ () => zodSchema18(
3671
3684
  z18.object({
3672
3685
  container: z18.union([
3673
3686
  z18.string(),
@@ -3691,23 +3704,24 @@ var codeInterpreter = (args = {}) => {
3691
3704
  // src/tool/file-search.ts
3692
3705
  import {
3693
3706
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
3694
- lazySchema as lazySchema4,
3695
- zodSchema as zodSchema17
3707
+ lazySchema as lazySchema6,
3708
+ zodSchema as zodSchema19
3696
3709
  } from "@ai-sdk/provider-utils";
3697
3710
  import { z as z19 } from "zod/v4";
3698
- var comparisonFilterSchema = z19.object({
3711
+ var comparisonFilterSchema = () => z19.object({
3699
3712
  key: z19.string(),
3700
3713
  type: z19.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
3701
3714
  value: z19.union([z19.string(), z19.number(), z19.boolean(), z19.array(z19.string())])
3702
3715
  });
3703
- var compoundFilterSchema = z19.object({
3716
+ var cachedCompoundFilterSchema;
3717
+ var compoundFilterSchema = () => cachedCompoundFilterSchema != null ? cachedCompoundFilterSchema : cachedCompoundFilterSchema = z19.object({
3704
3718
  type: z19.enum(["and", "or"]),
3705
3719
  filters: z19.array(
3706
- z19.union([comparisonFilterSchema, z19.lazy(() => compoundFilterSchema)])
3720
+ z19.union([comparisonFilterSchema(), z19.lazy(() => compoundFilterSchema())])
3707
3721
  )
3708
3722
  });
3709
- var fileSearchArgsSchema = lazySchema4(
3710
- () => zodSchema17(
3723
+ var fileSearchArgsSchema = lazySchema6(
3724
+ () => zodSchema19(
3711
3725
  z19.object({
3712
3726
  vectorStoreIds: z19.array(z19.string()),
3713
3727
  maxNumResults: z19.number().optional(),
@@ -3715,12 +3729,12 @@ var fileSearchArgsSchema = lazySchema4(
3715
3729
  ranker: z19.string().optional(),
3716
3730
  scoreThreshold: z19.number().optional()
3717
3731
  }).optional(),
3718
- filters: z19.union([comparisonFilterSchema, compoundFilterSchema]).optional()
3732
+ filters: z19.union([comparisonFilterSchema(), compoundFilterSchema()]).optional()
3719
3733
  })
3720
3734
  )
3721
3735
  );
3722
- var fileSearchOutputSchema = lazySchema4(
3723
- () => zodSchema17(
3736
+ var fileSearchOutputSchema = lazySchema6(
3737
+ () => zodSchema19(
3724
3738
  z19.object({
3725
3739
  queries: z19.array(z19.string()),
3726
3740
  results: z19.array(
@@ -3745,12 +3759,12 @@ var fileSearch = createProviderDefinedToolFactoryWithOutputSchema4({
3745
3759
  // src/tool/web-search-preview.ts
3746
3760
  import {
3747
3761
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema5,
3748
- lazySchema as lazySchema5,
3749
- zodSchema as zodSchema18
3762
+ lazySchema as lazySchema7,
3763
+ zodSchema as zodSchema20
3750
3764
  } from "@ai-sdk/provider-utils";
3751
3765
  import { z as z20 } from "zod/v4";
3752
- var webSearchPreviewArgsSchema = lazySchema5(
3753
- () => zodSchema18(
3766
+ var webSearchPreviewArgsSchema = lazySchema7(
3767
+ () => zodSchema20(
3754
3768
  z20.object({
3755
3769
  searchContextSize: z20.enum(["low", "medium", "high"]).optional(),
3756
3770
  userLocation: z20.object({
@@ -3763,11 +3777,11 @@ var webSearchPreviewArgsSchema = lazySchema5(
3763
3777
  })
3764
3778
  )
3765
3779
  );
3766
- var webSearchPreviewInputSchema = lazySchema5(
3767
- () => zodSchema18(z20.object({}))
3780
+ var webSearchPreviewInputSchema = lazySchema7(
3781
+ () => zodSchema20(z20.object({}))
3768
3782
  );
3769
- var webSearchPreviewOutputSchema = lazySchema5(
3770
- () => zodSchema18(
3783
+ var webSearchPreviewOutputSchema = lazySchema7(
3784
+ () => zodSchema20(
3771
3785
  z20.object({
3772
3786
  action: z20.discriminatedUnion("type", [
3773
3787
  z20.object({
@@ -3797,12 +3811,12 @@ var webSearchPreview = createProviderDefinedToolFactoryWithOutputSchema5({
3797
3811
  // src/tool/image-generation.ts
3798
3812
  import {
3799
3813
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema6,
3800
- lazySchema as lazySchema6,
3801
- zodSchema as zodSchema19
3814
+ lazySchema as lazySchema8,
3815
+ zodSchema as zodSchema21
3802
3816
  } from "@ai-sdk/provider-utils";
3803
3817
  import { z as z21 } from "zod/v4";
3804
- var imageGenerationArgsSchema = lazySchema6(
3805
- () => zodSchema19(
3818
+ var imageGenerationArgsSchema = lazySchema8(
3819
+ () => zodSchema21(
3806
3820
  z21.object({
3807
3821
  background: z21.enum(["auto", "opaque", "transparent"]).optional(),
3808
3822
  inputFidelity: z21.enum(["low", "high"]).optional(),
@@ -3820,9 +3834,9 @@ var imageGenerationArgsSchema = lazySchema6(
3820
3834
  }).strict()
3821
3835
  )
3822
3836
  );
3823
- var imageGenerationInputSchema = lazySchema6(() => zodSchema19(z21.object({})));
3824
- var imageGenerationOutputSchema = lazySchema6(
3825
- () => zodSchema19(z21.object({ result: z21.string() }))
3837
+ var imageGenerationInputSchema = lazySchema8(() => zodSchema21(z21.object({})));
3838
+ var imageGenerationOutputSchema = lazySchema8(
3839
+ () => zodSchema21(z21.object({ result: z21.string() }))
3826
3840
  );
3827
3841
  var imageGenerationToolFactory = createProviderDefinedToolFactoryWithOutputSchema6({
3828
3842
  id: "openai.image_generation",