@ai-sdk/openai 2.0.92 → 2.0.93

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
@@ -2033,7 +2033,7 @@ var webSearchOutputSchema = lazySchema5(
2033
2033
  url: z13.string().nullish(),
2034
2034
  pattern: z13.string().nullish()
2035
2035
  })
2036
- ]),
2036
+ ]).optional(),
2037
2037
  sources: z13.array(
2038
2038
  z13.discriminatedUnion("type", [
2039
2039
  z13.object({ type: z13.literal("url"), url: z13.string() }),
@@ -2092,7 +2092,7 @@ var webSearchPreviewOutputSchema = lazySchema6(
2092
2092
  url: z14.string().nullish(),
2093
2093
  pattern: z14.string().nullish()
2094
2094
  })
2095
- ])
2095
+ ]).optional()
2096
2096
  })
2097
2097
  )
2098
2098
  );
@@ -2659,7 +2659,7 @@ var openaiResponsesChunkSchema = lazyValidator8(
2659
2659
  url: z16.string().nullish(),
2660
2660
  pattern: z16.string().nullish()
2661
2661
  })
2662
- ])
2662
+ ]).nullish()
2663
2663
  }),
2664
2664
  z16.object({
2665
2665
  type: z16.literal("file_search_call"),
@@ -2856,7 +2856,10 @@ var openaiResponsesResponseSchema = lazyValidator8(
2856
2856
  sources: z16.array(
2857
2857
  z16.discriminatedUnion("type", [
2858
2858
  z16.object({ type: z16.literal("url"), url: z16.string() }),
2859
- z16.object({ type: z16.literal("api"), name: z16.string() })
2859
+ z16.object({
2860
+ type: z16.literal("api"),
2861
+ name: z16.string()
2862
+ })
2860
2863
  ])
2861
2864
  ).nullish()
2862
2865
  }),
@@ -2869,7 +2872,7 @@ var openaiResponsesResponseSchema = lazyValidator8(
2869
2872
  url: z16.string().nullish(),
2870
2873
  pattern: z16.string().nullish()
2871
2874
  })
2872
- ])
2875
+ ]).nullish()
2873
2876
  }),
2874
2877
  z16.object({
2875
2878
  type: z16.literal("file_search_call"),
@@ -4298,6 +4301,9 @@ function isErrorChunk(chunk) {
4298
4301
  }
4299
4302
  function mapWebSearchOutput(action) {
4300
4303
  var _a;
4304
+ if (action == null) {
4305
+ return {};
4306
+ }
4301
4307
  switch (action.type) {
4302
4308
  case "search":
4303
4309
  return {
@@ -4689,7 +4695,7 @@ var OpenAITranscriptionModel = class {
4689
4695
  };
4690
4696
 
4691
4697
  // src/version.ts
4692
- var VERSION = true ? "2.0.92" : "0.0.0-test";
4698
+ var VERSION = true ? "2.0.93" : "0.0.0-test";
4693
4699
 
4694
4700
  // src/openai-provider.ts
4695
4701
  function createOpenAI(options = {}) {