@ai-sdk/openai 3.0.0-beta.48 → 3.0.0-beta.50

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.
@@ -2623,7 +2623,12 @@ var openaiResponsesChunkSchema = lazySchema12(
2623
2623
  z14.object({
2624
2624
  type: z14.literal("search"),
2625
2625
  query: z14.string().nullish(),
2626
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2626
+ sources: z14.array(
2627
+ z14.discriminatedUnion("type", [
2628
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2629
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2630
+ ])
2631
+ ).nullish()
2627
2632
  }),
2628
2633
  z14.object({
2629
2634
  type: z14.literal("open_page"),
@@ -2642,7 +2647,10 @@ var openaiResponsesChunkSchema = lazySchema12(
2642
2647
  queries: z14.array(z14.string()),
2643
2648
  results: z14.array(
2644
2649
  z14.object({
2645
- attributes: z14.record(z14.string(), z14.unknown()),
2650
+ attributes: z14.record(
2651
+ z14.string(),
2652
+ z14.union([z14.string(), z14.number(), z14.boolean()])
2653
+ ),
2646
2654
  file_id: z14.string(),
2647
2655
  filename: z14.string(),
2648
2656
  score: z14.number(),
@@ -2810,7 +2818,12 @@ var openaiResponsesResponseSchema = lazySchema12(
2810
2818
  z14.object({
2811
2819
  type: z14.literal("search"),
2812
2820
  query: z14.string().nullish(),
2813
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2821
+ sources: z14.array(
2822
+ z14.discriminatedUnion("type", [
2823
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2824
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2825
+ ])
2826
+ ).nullish()
2814
2827
  }),
2815
2828
  z14.object({
2816
2829
  type: z14.literal("open_page"),
@@ -2829,7 +2842,10 @@ var openaiResponsesResponseSchema = lazySchema12(
2829
2842
  queries: z14.array(z14.string()),
2830
2843
  results: z14.array(
2831
2844
  z14.object({
2832
- attributes: z14.record(z14.string(), z14.unknown()),
2845
+ attributes: z14.record(
2846
+ z14.string(),
2847
+ z14.union([z14.string(), z14.number(), z14.boolean()])
2848
+ ),
2833
2849
  file_id: z14.string(),
2834
2850
  filename: z14.string(),
2835
2851
  score: z14.number(),
@@ -3162,7 +3178,12 @@ var webSearchOutputSchema = lazySchema16(
3162
3178
  pattern: z18.string()
3163
3179
  })
3164
3180
  ]),
3165
- sources: z18.array(z18.object({ type: z18.literal("url"), url: z18.string() })).optional()
3181
+ sources: z18.array(
3182
+ z18.discriminatedUnion("type", [
3183
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
3184
+ z18.object({ type: z18.literal("api"), name: z18.string() })
3185
+ ])
3186
+ ).optional()
3166
3187
  })
3167
3188
  )
3168
3189
  );