@ai-sdk/openai 2.0.60 → 2.0.61

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
@@ -1981,7 +1981,12 @@ var webSearchOutputSchema = lazySchema5(
1981
1981
  pattern: z13.string()
1982
1982
  })
1983
1983
  ]),
1984
- sources: z13.array(z13.object({ type: z13.literal("url"), url: z13.string() })).optional()
1984
+ sources: z13.array(
1985
+ z13.discriminatedUnion("type", [
1986
+ z13.object({ type: z13.literal("url"), url: z13.string() }),
1987
+ z13.object({ type: z13.literal("api"), name: z13.string() })
1988
+ ])
1989
+ ).optional()
1985
1990
  })
1986
1991
  )
1987
1992
  );
@@ -2585,7 +2590,12 @@ var openaiResponsesChunkSchema = lazyValidator8(
2585
2590
  z16.object({
2586
2591
  type: z16.literal("search"),
2587
2592
  query: z16.string().nullish(),
2588
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2593
+ sources: z16.array(
2594
+ z16.discriminatedUnion("type", [
2595
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2596
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2597
+ ])
2598
+ ).nullish()
2589
2599
  }),
2590
2600
  z16.object({
2591
2601
  type: z16.literal("open_page"),
@@ -2772,7 +2782,12 @@ var openaiResponsesResponseSchema = lazyValidator8(
2772
2782
  z16.object({
2773
2783
  type: z16.literal("search"),
2774
2784
  query: z16.string().nullish(),
2775
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2785
+ sources: z16.array(
2786
+ z16.discriminatedUnion("type", [
2787
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2788
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2789
+ ])
2790
+ ).nullish()
2776
2791
  }),
2777
2792
  z16.object({
2778
2793
  type: z16.literal("open_page"),
@@ -4529,7 +4544,7 @@ var OpenAITranscriptionModel = class {
4529
4544
  };
4530
4545
 
4531
4546
  // src/version.ts
4532
- var VERSION = true ? "2.0.60" : "0.0.0-test";
4547
+ var VERSION = true ? "2.0.61" : "0.0.0-test";
4533
4548
 
4534
4549
  // src/openai-provider.ts
4535
4550
  function createOpenAI(options = {}) {