@ai-sdk/openai 2.0.92 → 2.0.93

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"),
@@ -3285,7 +3288,7 @@ var webSearchOutputSchema = lazySchema4(
3285
3288
  url: z18.string().nullish(),
3286
3289
  pattern: z18.string().nullish()
3287
3290
  })
3288
- ]),
3291
+ ]).optional(),
3289
3292
  sources: z18.array(
3290
3293
  z18.discriminatedUnion("type", [
3291
3294
  z18.object({ type: z18.literal("url"), url: z18.string() }),
@@ -3343,7 +3346,7 @@ var webSearchPreviewOutputSchema = lazySchema5(
3343
3346
  url: z19.string().nullish(),
3344
3347
  pattern: z19.string().nullish()
3345
3348
  })
3346
- ])
3349
+ ]).optional()
3347
3350
  })
3348
3351
  )
3349
3352
  );
@@ -4590,6 +4593,9 @@ function isErrorChunk(chunk) {
4590
4593
  }
4591
4594
  function mapWebSearchOutput(action) {
4592
4595
  var _a;
4596
+ if (action == null) {
4597
+ return {};
4598
+ }
4593
4599
  switch (action.type) {
4594
4600
  case "search":
4595
4601
  return {