@ai-sdk/openai 2.0.54 → 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.
@@ -2639,7 +2639,8 @@ var openaiResponsesChunkSchema = lazyValidator11(
2639
2639
  action: z14.discriminatedUnion("type", [
2640
2640
  z14.object({
2641
2641
  type: z14.literal("search"),
2642
- query: z14.string().nullish()
2642
+ query: z14.string().nullish(),
2643
+ sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2643
2644
  }),
2644
2645
  z14.object({
2645
2646
  type: z14.literal("open_page"),
@@ -2825,7 +2826,8 @@ var openaiResponsesResponseSchema = lazyValidator11(
2825
2826
  action: z14.discriminatedUnion("type", [
2826
2827
  z14.object({
2827
2828
  type: z14.literal("search"),
2828
- query: z14.string().nullish()
2829
+ query: z14.string().nullish(),
2830
+ sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2829
2831
  }),
2830
2832
  z14.object({
2831
2833
  type: z14.literal("open_page"),
@@ -3179,7 +3181,8 @@ var webSearchOutputSchema = lazySchema4(
3179
3181
  url: z18.string(),
3180
3182
  pattern: z18.string()
3181
3183
  })
3182
- ])
3184
+ ]),
3185
+ sources: z18.array(z18.object({ type: z18.literal("url"), url: z18.string() })).optional()
3183
3186
  })
3184
3187
  )
3185
3188
  );
@@ -4438,7 +4441,11 @@ function mapWebSearchOutput(action) {
4438
4441
  var _a;
4439
4442
  switch (action.type) {
4440
4443
  case "search":
4441
- return { action: { type: "search", query: (_a = action.query) != null ? _a : void 0 } };
4444
+ return {
4445
+ action: { type: "search", query: (_a = action.query) != null ? _a : void 0 },
4446
+ // include sources when provided by the Responses API (behind include flag)
4447
+ ...action.sources != null && { sources: action.sources }
4448
+ };
4442
4449
  case "open_page":
4443
4450
  return { action: { type: "openPage", url: action.url } };
4444
4451
  case "find":