@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.
package/dist/index.mjs CHANGED
@@ -1970,7 +1970,12 @@ var webSearchOutputSchema = lazySchema12(
1970
1970
  pattern: z13.string()
1971
1971
  })
1972
1972
  ]),
1973
- sources: z13.array(z13.object({ type: z13.literal("url"), url: z13.string() })).optional()
1973
+ sources: z13.array(
1974
+ z13.discriminatedUnion("type", [
1975
+ z13.object({ type: z13.literal("url"), url: z13.string() }),
1976
+ z13.object({ type: z13.literal("api"), name: z13.string() })
1977
+ ])
1978
+ ).optional()
1974
1979
  })
1975
1980
  )
1976
1981
  );
@@ -2591,7 +2596,12 @@ var openaiResponsesChunkSchema = lazySchema14(
2591
2596
  z16.object({
2592
2597
  type: z16.literal("search"),
2593
2598
  query: z16.string().nullish(),
2594
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2599
+ sources: z16.array(
2600
+ z16.discriminatedUnion("type", [
2601
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2602
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2603
+ ])
2604
+ ).nullish()
2595
2605
  }),
2596
2606
  z16.object({
2597
2607
  type: z16.literal("open_page"),
@@ -2610,7 +2620,10 @@ var openaiResponsesChunkSchema = lazySchema14(
2610
2620
  queries: z16.array(z16.string()),
2611
2621
  results: z16.array(
2612
2622
  z16.object({
2613
- attributes: z16.record(z16.string(), z16.unknown()),
2623
+ attributes: z16.record(
2624
+ z16.string(),
2625
+ z16.union([z16.string(), z16.number(), z16.boolean()])
2626
+ ),
2614
2627
  file_id: z16.string(),
2615
2628
  filename: z16.string(),
2616
2629
  score: z16.number(),
@@ -2778,7 +2791,12 @@ var openaiResponsesResponseSchema = lazySchema14(
2778
2791
  z16.object({
2779
2792
  type: z16.literal("search"),
2780
2793
  query: z16.string().nullish(),
2781
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2794
+ sources: z16.array(
2795
+ z16.discriminatedUnion("type", [
2796
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2797
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2798
+ ])
2799
+ ).nullish()
2782
2800
  }),
2783
2801
  z16.object({
2784
2802
  type: z16.literal("open_page"),
@@ -2797,7 +2815,10 @@ var openaiResponsesResponseSchema = lazySchema14(
2797
2815
  queries: z16.array(z16.string()),
2798
2816
  results: z16.array(
2799
2817
  z16.object({
2800
- attributes: z16.record(z16.string(), z16.unknown()),
2818
+ attributes: z16.record(
2819
+ z16.string(),
2820
+ z16.union([z16.string(), z16.number(), z16.boolean()])
2821
+ ),
2801
2822
  file_id: z16.string(),
2802
2823
  filename: z16.string(),
2803
2824
  score: z16.number(),
@@ -4530,7 +4551,7 @@ var OpenAITranscriptionModel = class {
4530
4551
  };
4531
4552
 
4532
4553
  // src/version.ts
4533
- var VERSION = true ? "3.0.0-beta.48" : "0.0.0-test";
4554
+ var VERSION = true ? "3.0.0-beta.50" : "0.0.0-test";
4534
4555
 
4535
4556
  // src/openai-provider.ts
4536
4557
  function createOpenAI(options = {}) {