@ai-sdk/openai 3.0.0-beta.36 → 3.0.0-beta.38

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.
@@ -2634,7 +2634,8 @@ var openaiResponsesChunkSchema = lazySchema12(
2634
2634
  action: z14.discriminatedUnion("type", [
2635
2635
  z14.object({
2636
2636
  type: z14.literal("search"),
2637
- query: z14.string().nullish()
2637
+ query: z14.string().nullish(),
2638
+ sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2638
2639
  }),
2639
2640
  z14.object({
2640
2641
  type: z14.literal("open_page"),
@@ -2820,7 +2821,8 @@ var openaiResponsesResponseSchema = lazySchema12(
2820
2821
  action: z14.discriminatedUnion("type", [
2821
2822
  z14.object({
2822
2823
  type: z14.literal("search"),
2823
- query: z14.string().nullish()
2824
+ query: z14.string().nullish(),
2825
+ sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2824
2826
  }),
2825
2827
  z14.object({
2826
2828
  type: z14.literal("open_page"),
@@ -3171,7 +3173,8 @@ var webSearchOutputSchema = lazySchema16(
3171
3173
  url: z18.string(),
3172
3174
  pattern: z18.string()
3173
3175
  })
3174
- ])
3176
+ ]),
3177
+ sources: z18.array(z18.object({ type: z18.literal("url"), url: z18.string() })).optional()
3175
3178
  })
3176
3179
  )
3177
3180
  );
@@ -4445,7 +4448,11 @@ function mapWebSearchOutput(action) {
4445
4448
  var _a;
4446
4449
  switch (action.type) {
4447
4450
  case "search":
4448
- return { action: { type: "search", query: (_a = action.query) != null ? _a : void 0 } };
4451
+ return {
4452
+ action: { type: "search", query: (_a = action.query) != null ? _a : void 0 },
4453
+ // include sources when provided by the Responses API (behind include flag)
4454
+ ...action.sources != null && { sources: action.sources }
4455
+ };
4449
4456
  case "open_page":
4450
4457
  return { action: { type: "openPage", url: action.url } };
4451
4458
  case "find":