@ai-sdk/openai 3.0.0-beta.24 → 3.0.0-beta.25

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.
@@ -246,12 +246,9 @@ function mapOpenAIFinishReason(finishReason) {
246
246
  }
247
247
 
248
248
  // src/chat/openai-chat-api.ts
249
- import {
250
- lazyValidator,
251
- zodSchema
252
- } from "@ai-sdk/provider-utils";
249
+ import { lazySchema, zodSchema } from "@ai-sdk/provider-utils";
253
250
  import { z as z2 } from "zod/v4";
254
- var openaiChatResponseSchema = lazyValidator(
251
+ var openaiChatResponseSchema = lazySchema(
255
252
  () => zodSchema(
256
253
  z2.object({
257
254
  id: z2.string().nullish(),
@@ -316,7 +313,7 @@ var openaiChatResponseSchema = lazyValidator(
316
313
  })
317
314
  )
318
315
  );
319
- var openaiChatChunkSchema = lazyValidator(
316
+ var openaiChatChunkSchema = lazySchema(
320
317
  () => zodSchema(
321
318
  z2.union([
322
319
  z2.object({
@@ -387,12 +384,9 @@ var openaiChatChunkSchema = lazyValidator(
387
384
  );
388
385
 
389
386
  // src/chat/openai-chat-options.ts
390
- import {
391
- lazyValidator as lazyValidator2,
392
- zodSchema as zodSchema2
393
- } from "@ai-sdk/provider-utils";
387
+ import { lazySchema as lazySchema2, zodSchema as zodSchema2 } from "@ai-sdk/provider-utils";
394
388
  import { z as z3 } from "zod/v4";
395
- var openaiChatLanguageModelOptions = lazyValidator2(
389
+ var openaiChatLanguageModelOptions = lazySchema2(
396
390
  () => zodSchema2(
397
391
  z3.object({
398
392
  /**
@@ -1210,11 +1204,8 @@ function mapOpenAIFinishReason2(finishReason) {
1210
1204
 
1211
1205
  // src/completion/openai-completion-api.ts
1212
1206
  import { z as z4 } from "zod/v4";
1213
- import {
1214
- lazyValidator as lazyValidator3,
1215
- zodSchema as zodSchema3
1216
- } from "@ai-sdk/provider-utils";
1217
- var openaiCompletionResponseSchema = lazyValidator3(
1207
+ import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
1208
+ var openaiCompletionResponseSchema = lazySchema3(
1218
1209
  () => zodSchema3(
1219
1210
  z4.object({
1220
1211
  id: z4.string().nullish(),
@@ -1239,7 +1230,7 @@ var openaiCompletionResponseSchema = lazyValidator3(
1239
1230
  })
1240
1231
  )
1241
1232
  );
1242
- var openaiCompletionChunkSchema = lazyValidator3(
1233
+ var openaiCompletionChunkSchema = lazySchema3(
1243
1234
  () => zodSchema3(
1244
1235
  z4.union([
1245
1236
  z4.object({
@@ -1270,12 +1261,9 @@ var openaiCompletionChunkSchema = lazyValidator3(
1270
1261
  );
1271
1262
 
1272
1263
  // src/completion/openai-completion-options.ts
1273
- import {
1274
- lazyValidator as lazyValidator4,
1275
- zodSchema as zodSchema4
1276
- } from "@ai-sdk/provider-utils";
1264
+ import { lazySchema as lazySchema4, zodSchema as zodSchema4 } from "@ai-sdk/provider-utils";
1277
1265
  import { z as z5 } from "zod/v4";
1278
- var openaiCompletionProviderOptions = lazyValidator4(
1266
+ var openaiCompletionProviderOptions = lazySchema4(
1279
1267
  () => zodSchema4(
1280
1268
  z5.object({
1281
1269
  /**
@@ -1562,12 +1550,9 @@ import {
1562
1550
  } from "@ai-sdk/provider-utils";
1563
1551
 
1564
1552
  // src/embedding/openai-embedding-options.ts
1565
- import {
1566
- lazyValidator as lazyValidator5,
1567
- zodSchema as zodSchema5
1568
- } from "@ai-sdk/provider-utils";
1553
+ import { lazySchema as lazySchema5, zodSchema as zodSchema5 } from "@ai-sdk/provider-utils";
1569
1554
  import { z as z6 } from "zod/v4";
1570
- var openaiEmbeddingProviderOptions = lazyValidator5(
1555
+ var openaiEmbeddingProviderOptions = lazySchema5(
1571
1556
  () => zodSchema5(
1572
1557
  z6.object({
1573
1558
  /**
@@ -1585,9 +1570,9 @@ var openaiEmbeddingProviderOptions = lazyValidator5(
1585
1570
  );
1586
1571
 
1587
1572
  // src/embedding/openai-embedding-api.ts
1588
- import { lazyValidator as lazyValidator6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
1573
+ import { lazySchema as lazySchema6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
1589
1574
  import { z as z7 } from "zod/v4";
1590
- var openaiTextEmbeddingResponseSchema = lazyValidator6(
1575
+ var openaiTextEmbeddingResponseSchema = lazySchema6(
1591
1576
  () => zodSchema6(
1592
1577
  z7.object({
1593
1578
  data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
@@ -1668,9 +1653,9 @@ import {
1668
1653
  } from "@ai-sdk/provider-utils";
1669
1654
 
1670
1655
  // src/image/openai-image-api.ts
1671
- import { lazyValidator as lazyValidator7, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
1656
+ import { lazySchema as lazySchema7, zodSchema as zodSchema7 } from "@ai-sdk/provider-utils";
1672
1657
  import { z as z8 } from "zod/v4";
1673
- var openaiImageResponseSchema = lazyValidator7(
1658
+ var openaiImageResponseSchema = lazySchema7(
1674
1659
  () => zodSchema7(
1675
1660
  z8.object({
1676
1661
  data: z8.array(
@@ -1785,9 +1770,9 @@ import {
1785
1770
  } from "@ai-sdk/provider-utils";
1786
1771
 
1787
1772
  // src/transcription/openai-transcription-api.ts
1788
- import { lazyValidator as lazyValidator8, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
1773
+ import { lazySchema as lazySchema8, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
1789
1774
  import { z as z9 } from "zod/v4";
1790
- var openaiTranscriptionResponseSchema = lazyValidator8(
1775
+ var openaiTranscriptionResponseSchema = lazySchema8(
1791
1776
  () => zodSchema8(
1792
1777
  z9.object({
1793
1778
  text: z9.string(),
@@ -1819,12 +1804,9 @@ var openaiTranscriptionResponseSchema = lazyValidator8(
1819
1804
  );
1820
1805
 
1821
1806
  // src/transcription/openai-transcription-options.ts
1822
- import {
1823
- lazyValidator as lazyValidator9,
1824
- zodSchema as zodSchema9
1825
- } from "@ai-sdk/provider-utils";
1807
+ import { lazySchema as lazySchema9, zodSchema as zodSchema9 } from "@ai-sdk/provider-utils";
1826
1808
  import { z as z10 } from "zod/v4";
1827
- var openAITranscriptionProviderOptions = lazyValidator9(
1809
+ var openAITranscriptionProviderOptions = lazySchema9(
1828
1810
  () => zodSchema9(
1829
1811
  z10.object({
1830
1812
  /**
@@ -2029,12 +2011,9 @@ import {
2029
2011
  } from "@ai-sdk/provider-utils";
2030
2012
 
2031
2013
  // src/speech/openai-speech-options.ts
2032
- import {
2033
- lazyValidator as lazyValidator10,
2034
- zodSchema as zodSchema10
2035
- } from "@ai-sdk/provider-utils";
2014
+ import { lazySchema as lazySchema10, zodSchema as zodSchema10 } from "@ai-sdk/provider-utils";
2036
2015
  import { z as z11 } from "zod/v4";
2037
- var openaiSpeechProviderOptionsSchema = lazyValidator10(
2016
+ var openaiSpeechProviderOptionsSchema = lazySchema10(
2038
2017
  () => zodSchema10(
2039
2018
  z11.object({
2040
2019
  instructions: z11.string().nullish(),
@@ -2171,11 +2150,11 @@ import { z as z13 } from "zod/v4";
2171
2150
  // src/tool/local-shell.ts
2172
2151
  import {
2173
2152
  createProviderDefinedToolFactoryWithOutputSchema,
2174
- lazySchema,
2153
+ lazySchema as lazySchema11,
2175
2154
  zodSchema as zodSchema11
2176
2155
  } from "@ai-sdk/provider-utils";
2177
2156
  import { z as z12 } from "zod/v4";
2178
- var localShellInputSchema = lazySchema(
2157
+ var localShellInputSchema = lazySchema11(
2179
2158
  () => zodSchema11(
2180
2159
  z12.object({
2181
2160
  action: z12.object({
@@ -2189,7 +2168,7 @@ var localShellInputSchema = lazySchema(
2189
2168
  })
2190
2169
  )
2191
2170
  );
2192
- var localShellOutputSchema = lazySchema(
2171
+ var localShellOutputSchema = lazySchema11(
2193
2172
  () => zodSchema11(z12.object({ output: z12.string() }))
2194
2173
  );
2195
2174
  var localShell = createProviderDefinedToolFactoryWithOutputSchema({
@@ -2488,12 +2467,9 @@ function mapOpenAIResponseFinishReason({
2488
2467
  }
2489
2468
 
2490
2469
  // src/responses/openai-responses-api.ts
2491
- import {
2492
- lazyValidator as lazyValidator11,
2493
- zodSchema as zodSchema12
2494
- } from "@ai-sdk/provider-utils";
2470
+ import { lazySchema as lazySchema12, zodSchema as zodSchema12 } from "@ai-sdk/provider-utils";
2495
2471
  import { z as z14 } from "zod/v4";
2496
- var openaiResponsesChunkSchema = lazyValidator11(
2472
+ var openaiResponsesChunkSchema = lazySchema12(
2497
2473
  () => zodSchema12(
2498
2474
  z14.union([
2499
2475
  z14.object({
@@ -2753,7 +2729,7 @@ var openaiResponsesChunkSchema = lazyValidator11(
2753
2729
  ])
2754
2730
  )
2755
2731
  );
2756
- var openaiResponsesResponseSchema = lazyValidator11(
2732
+ var openaiResponsesResponseSchema = lazySchema12(
2757
2733
  () => zodSchema12(
2758
2734
  z14.object({
2759
2735
  id: z14.string(),
@@ -2913,10 +2889,7 @@ var openaiResponsesResponseSchema = lazyValidator11(
2913
2889
  );
2914
2890
 
2915
2891
  // src/responses/openai-responses-options.ts
2916
- import {
2917
- lazyValidator as lazyValidator12,
2918
- zodSchema as zodSchema13
2919
- } from "@ai-sdk/provider-utils";
2892
+ import { lazySchema as lazySchema13, zodSchema as zodSchema13 } from "@ai-sdk/provider-utils";
2920
2893
  import { z as z15 } from "zod/v4";
2921
2894
  var TOP_LOGPROBS_MAX = 20;
2922
2895
  var openaiResponsesReasoningModelIds = [
@@ -2976,7 +2949,7 @@ var openaiResponsesModelIds = [
2976
2949
  "gpt-5-chat-latest",
2977
2950
  ...openaiResponsesReasoningModelIds
2978
2951
  ];
2979
- var openaiResponsesProviderOptionsSchema = lazyValidator12(
2952
+ var openaiResponsesProviderOptionsSchema = lazySchema13(
2980
2953
  () => zodSchema13(
2981
2954
  z15.object({
2982
2955
  include: z15.array(
@@ -3030,11 +3003,11 @@ import {
3030
3003
  // src/tool/code-interpreter.ts
3031
3004
  import {
3032
3005
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
3033
- lazySchema as lazySchema2,
3006
+ lazySchema as lazySchema14,
3034
3007
  zodSchema as zodSchema14
3035
3008
  } from "@ai-sdk/provider-utils";
3036
3009
  import { z as z16 } from "zod/v4";
3037
- var codeInterpreterInputSchema = lazySchema2(
3010
+ var codeInterpreterInputSchema = lazySchema14(
3038
3011
  () => zodSchema14(
3039
3012
  z16.object({
3040
3013
  code: z16.string().nullish(),
@@ -3042,7 +3015,7 @@ var codeInterpreterInputSchema = lazySchema2(
3042
3015
  })
3043
3016
  )
3044
3017
  );
3045
- var codeInterpreterOutputSchema = lazySchema2(
3018
+ var codeInterpreterOutputSchema = lazySchema14(
3046
3019
  () => zodSchema14(
3047
3020
  z16.object({
3048
3021
  outputs: z16.array(
@@ -3054,7 +3027,7 @@ var codeInterpreterOutputSchema = lazySchema2(
3054
3027
  })
3055
3028
  )
3056
3029
  );
3057
- var codeInterpreterArgsSchema = lazySchema2(
3030
+ var codeInterpreterArgsSchema = lazySchema14(
3058
3031
  () => zodSchema14(
3059
3032
  z16.object({
3060
3033
  container: z16.union([
@@ -3079,7 +3052,7 @@ var codeInterpreter = (args = {}) => {
3079
3052
  // src/tool/file-search.ts
3080
3053
  import {
3081
3054
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
3082
- lazySchema as lazySchema3,
3055
+ lazySchema as lazySchema15,
3083
3056
  zodSchema as zodSchema15
3084
3057
  } from "@ai-sdk/provider-utils";
3085
3058
  import { z as z17 } from "zod/v4";
@@ -3094,7 +3067,7 @@ var compoundFilterSchema = z17.object({
3094
3067
  z17.union([comparisonFilterSchema, z17.lazy(() => compoundFilterSchema)])
3095
3068
  )
3096
3069
  });
3097
- var fileSearchArgsSchema = lazySchema3(
3070
+ var fileSearchArgsSchema = lazySchema15(
3098
3071
  () => zodSchema15(
3099
3072
  z17.object({
3100
3073
  vectorStoreIds: z17.array(z17.string()),
@@ -3107,7 +3080,7 @@ var fileSearchArgsSchema = lazySchema3(
3107
3080
  })
3108
3081
  )
3109
3082
  );
3110
- var fileSearchOutputSchema = lazySchema3(
3083
+ var fileSearchOutputSchema = lazySchema15(
3111
3084
  () => zodSchema15(
3112
3085
  z17.object({
3113
3086
  queries: z17.array(z17.string()),
@@ -3133,11 +3106,11 @@ var fileSearch = createProviderDefinedToolFactoryWithOutputSchema3({
3133
3106
  // src/tool/web-search.ts
3134
3107
  import {
3135
3108
  createProviderDefinedToolFactory,
3136
- lazySchema as lazySchema4,
3109
+ lazySchema as lazySchema16,
3137
3110
  zodSchema as zodSchema16
3138
3111
  } from "@ai-sdk/provider-utils";
3139
3112
  import { z as z18 } from "zod/v4";
3140
- var webSearchArgsSchema = lazySchema4(
3113
+ var webSearchArgsSchema = lazySchema16(
3141
3114
  () => zodSchema16(
3142
3115
  z18.object({
3143
3116
  filters: z18.object({
@@ -3154,7 +3127,7 @@ var webSearchArgsSchema = lazySchema4(
3154
3127
  })
3155
3128
  )
3156
3129
  );
3157
- var webSearchInputSchema = lazySchema4(
3130
+ var webSearchInputSchema = lazySchema16(
3158
3131
  () => zodSchema16(
3159
3132
  z18.object({
3160
3133
  action: z18.discriminatedUnion("type", [
@@ -3184,11 +3157,11 @@ var webSearchToolFactory = createProviderDefinedToolFactory({
3184
3157
  // src/tool/web-search-preview.ts
3185
3158
  import {
3186
3159
  createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
3187
- lazySchema as lazySchema5,
3160
+ lazySchema as lazySchema17,
3188
3161
  zodSchema as zodSchema17
3189
3162
  } from "@ai-sdk/provider-utils";
3190
3163
  import { z as z19 } from "zod/v4";
3191
- var webSearchPreviewArgsSchema = lazySchema5(
3164
+ var webSearchPreviewArgsSchema = lazySchema17(
3192
3165
  () => zodSchema17(
3193
3166
  z19.object({
3194
3167
  /**
@@ -3226,7 +3199,7 @@ var webSearchPreviewArgsSchema = lazySchema5(
3226
3199
  })
3227
3200
  )
3228
3201
  );
3229
- var webSearchPreviewInputSchema = lazySchema5(
3202
+ var webSearchPreviewInputSchema = lazySchema17(
3230
3203
  () => zodSchema17(
3231
3204
  z19.object({
3232
3205
  action: z19.discriminatedUnion("type", [
@@ -3256,11 +3229,11 @@ var webSearchPreview = createProviderDefinedToolFactory2({
3256
3229
  // src/tool/image-generation.ts
3257
3230
  import {
3258
3231
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
3259
- lazySchema as lazySchema6,
3232
+ lazySchema as lazySchema18,
3260
3233
  zodSchema as zodSchema18
3261
3234
  } from "@ai-sdk/provider-utils";
3262
3235
  import { z as z20 } from "zod/v4";
3263
- var imageGenerationArgsSchema = lazySchema6(
3236
+ var imageGenerationArgsSchema = lazySchema18(
3264
3237
  () => zodSchema18(
3265
3238
  z20.object({
3266
3239
  background: z20.enum(["auto", "opaque", "transparent"]).optional(),
@@ -3279,8 +3252,8 @@ var imageGenerationArgsSchema = lazySchema6(
3279
3252
  }).strict()
3280
3253
  )
3281
3254
  );
3282
- var imageGenerationInputSchema = lazySchema6(() => zodSchema18(z20.object({})));
3283
- var imageGenerationOutputSchema = lazySchema6(
3255
+ var imageGenerationInputSchema = lazySchema18(() => zodSchema18(z20.object({})));
3256
+ var imageGenerationOutputSchema = lazySchema18(
3284
3257
  () => zodSchema18(z20.object({ result: z20.string() }))
3285
3258
  );
3286
3259
  var imageGenerationToolFactory = createProviderDefinedToolFactoryWithOutputSchema4({