@ai-sdk/openai 2.0.53 → 2.0.55

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
@@ -1992,7 +1992,8 @@ var webSearchOutputSchema = lazySchema5(
1992
1992
  url: z13.string(),
1993
1993
  pattern: z13.string()
1994
1994
  })
1995
- ])
1995
+ ]),
1996
+ sources: z13.array(z13.object({ type: z13.literal("url"), url: z13.string() })).optional()
1996
1997
  })
1997
1998
  )
1998
1999
  );
@@ -2595,7 +2596,8 @@ var openaiResponsesChunkSchema = lazyValidator8(
2595
2596
  action: z16.discriminatedUnion("type", [
2596
2597
  z16.object({
2597
2598
  type: z16.literal("search"),
2598
- query: z16.string().nullish()
2599
+ query: z16.string().nullish(),
2600
+ sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2599
2601
  }),
2600
2602
  z16.object({
2601
2603
  type: z16.literal("open_page"),
@@ -2781,7 +2783,8 @@ var openaiResponsesResponseSchema = lazyValidator8(
2781
2783
  action: z16.discriminatedUnion("type", [
2782
2784
  z16.object({
2783
2785
  type: z16.literal("search"),
2784
- query: z16.string().nullish()
2786
+ query: z16.string().nullish(),
2787
+ sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2785
2788
  }),
2786
2789
  z16.object({
2787
2790
  type: z16.literal("open_page"),
@@ -4146,7 +4149,11 @@ function mapWebSearchOutput(action) {
4146
4149
  var _a;
4147
4150
  switch (action.type) {
4148
4151
  case "search":
4149
- return { action: { type: "search", query: (_a = action.query) != null ? _a : void 0 } };
4152
+ return {
4153
+ action: { type: "search", query: (_a = action.query) != null ? _a : void 0 },
4154
+ // include sources when provided by the Responses API (behind include flag)
4155
+ ...action.sources != null && { sources: action.sources }
4156
+ };
4150
4157
  case "open_page":
4151
4158
  return { action: { type: "openPage", url: action.url } };
4152
4159
  case "find":
@@ -4527,7 +4534,7 @@ var OpenAITranscriptionModel = class {
4527
4534
  };
4528
4535
 
4529
4536
  // src/version.ts
4530
- var VERSION = true ? "2.0.53" : "0.0.0-test";
4537
+ var VERSION = true ? "2.0.55" : "0.0.0-test";
4531
4538
 
4532
4539
  // src/openai-provider.ts
4533
4540
  function createOpenAI(options = {}) {