@ai-sdk/openai 2.0.92 → 2.0.94

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.
@@ -2696,7 +2696,7 @@ var openaiResponsesChunkSchema = lazyValidator11(
2696
2696
  url: z14.string().nullish(),
2697
2697
  pattern: z14.string().nullish()
2698
2698
  })
2699
- ])
2699
+ ]).nullish()
2700
2700
  }),
2701
2701
  z14.object({
2702
2702
  type: z14.literal("file_search_call"),
@@ -2893,7 +2893,10 @@ var openaiResponsesResponseSchema = lazyValidator11(
2893
2893
  sources: z14.array(
2894
2894
  z14.discriminatedUnion("type", [
2895
2895
  z14.object({ type: z14.literal("url"), url: z14.string() }),
2896
- z14.object({ type: z14.literal("api"), name: z14.string() })
2896
+ z14.object({
2897
+ type: z14.literal("api"),
2898
+ name: z14.string()
2899
+ })
2897
2900
  ])
2898
2901
  ).nullish()
2899
2902
  }),
@@ -2906,7 +2909,7 @@ var openaiResponsesResponseSchema = lazyValidator11(
2906
2909
  url: z14.string().nullish(),
2907
2910
  pattern: z14.string().nullish()
2908
2911
  })
2909
- ])
2912
+ ]).nullish()
2910
2913
  }),
2911
2914
  z14.object({
2912
2915
  type: z14.literal("file_search_call"),
@@ -3030,7 +3033,9 @@ var openaiResponsesReasoningModelIds = [
3030
3033
  "gpt-5.1-codex-max",
3031
3034
  "gpt-5.2",
3032
3035
  "gpt-5.2-chat-latest",
3033
- "gpt-5.2-pro"
3036
+ "gpt-5.2-pro",
3037
+ "gpt-5.2-codex",
3038
+ "gpt-5.3-codex"
3034
3039
  ];
3035
3040
  var openaiResponsesModelIds = [
3036
3041
  "gpt-4.1",
@@ -3285,7 +3290,7 @@ var webSearchOutputSchema = lazySchema4(
3285
3290
  url: z18.string().nullish(),
3286
3291
  pattern: z18.string().nullish()
3287
3292
  })
3288
- ]),
3293
+ ]).optional(),
3289
3294
  sources: z18.array(
3290
3295
  z18.discriminatedUnion("type", [
3291
3296
  z18.object({ type: z18.literal("url"), url: z18.string() }),
@@ -3343,7 +3348,7 @@ var webSearchPreviewOutputSchema = lazySchema5(
3343
3348
  url: z19.string().nullish(),
3344
3349
  pattern: z19.string().nullish()
3345
3350
  })
3346
- ])
3351
+ ]).optional()
3347
3352
  })
3348
3353
  )
3349
3354
  );
@@ -4590,6 +4595,9 @@ function isErrorChunk(chunk) {
4590
4595
  }
4591
4596
  function mapWebSearchOutput(action) {
4592
4597
  var _a;
4598
+ if (action == null) {
4599
+ return {};
4600
+ }
4593
4601
  switch (action.type) {
4594
4602
  case "search":
4595
4603
  return {