@ai-sdk/openai 3.0.0-beta.35 → 3.0.0-beta.37

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,8 @@ var webSearchOutputSchema = lazySchema12(
1981
1981
  url: z13.string(),
1982
1982
  pattern: z13.string()
1983
1983
  })
1984
- ])
1984
+ ]),
1985
+ sources: z13.array(z13.object({ type: z13.literal("url"), url: z13.string() })).optional()
1985
1986
  })
1986
1987
  )
1987
1988
  );
@@ -2601,7 +2602,8 @@ var openaiResponsesChunkSchema = lazySchema14(
2601
2602
  action: z16.discriminatedUnion("type", [
2602
2603
  z16.object({
2603
2604
  type: z16.literal("search"),
2604
- query: z16.string().nullish()
2605
+ query: z16.string().nullish(),
2606
+ sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2605
2607
  }),
2606
2608
  z16.object({
2607
2609
  type: z16.literal("open_page"),
@@ -2787,7 +2789,8 @@ var openaiResponsesResponseSchema = lazySchema14(
2787
2789
  action: z16.discriminatedUnion("type", [
2788
2790
  z16.object({
2789
2791
  type: z16.literal("search"),
2790
- query: z16.string().nullish()
2792
+ query: z16.string().nullish(),
2793
+ sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2791
2794
  }),
2792
2795
  z16.object({
2793
2796
  type: z16.literal("open_page"),
@@ -4164,7 +4167,11 @@ function mapWebSearchOutput(action) {
4164
4167
  var _a;
4165
4168
  switch (action.type) {
4166
4169
  case "search":
4167
- return { action: { type: "search", query: (_a = action.query) != null ? _a : void 0 } };
4170
+ return {
4171
+ action: { type: "search", query: (_a = action.query) != null ? _a : void 0 },
4172
+ // include sources when provided by the Responses API (behind include flag)
4173
+ ...action.sources != null && { sources: action.sources }
4174
+ };
4168
4175
  case "open_page":
4169
4176
  return { action: { type: "openPage", url: action.url } };
4170
4177
  case "find":
@@ -4539,7 +4546,7 @@ var OpenAITranscriptionModel = class {
4539
4546
  };
4540
4547
 
4541
4548
  // src/version.ts
4542
- var VERSION = true ? "3.0.0-beta.35" : "0.0.0-test";
4549
+ var VERSION = true ? "3.0.0-beta.37" : "0.0.0-test";
4543
4550
 
4544
4551
  // src/openai-provider.ts
4545
4552
  function createOpenAI(options = {}) {