@ai-sdk/openai 2.0.59 → 2.0.61

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
@@ -1063,18 +1063,6 @@ function getSystemMessageMode(modelId) {
1063
1063
  return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
1064
1064
  }
1065
1065
  var reasoningModels = {
1066
- "o1-mini": {
1067
- systemMessageMode: "remove"
1068
- },
1069
- "o1-mini-2024-09-12": {
1070
- systemMessageMode: "remove"
1071
- },
1072
- "o1-preview": {
1073
- systemMessageMode: "remove"
1074
- },
1075
- "o1-preview-2024-09-12": {
1076
- systemMessageMode: "remove"
1077
- },
1078
1066
  o3: {
1079
1067
  systemMessageMode: "developer"
1080
1068
  },
@@ -1993,7 +1981,12 @@ var webSearchOutputSchema = lazySchema5(
1993
1981
  pattern: z13.string()
1994
1982
  })
1995
1983
  ]),
1996
- sources: z13.array(z13.object({ type: z13.literal("url"), url: z13.string() })).optional()
1984
+ sources: z13.array(
1985
+ z13.discriminatedUnion("type", [
1986
+ z13.object({ type: z13.literal("url"), url: z13.string() }),
1987
+ z13.object({ type: z13.literal("api"), name: z13.string() })
1988
+ ])
1989
+ ).optional()
1997
1990
  })
1998
1991
  )
1999
1992
  );
@@ -2597,7 +2590,12 @@ var openaiResponsesChunkSchema = lazyValidator8(
2597
2590
  z16.object({
2598
2591
  type: z16.literal("search"),
2599
2592
  query: z16.string().nullish(),
2600
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2593
+ sources: z16.array(
2594
+ z16.discriminatedUnion("type", [
2595
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2596
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2597
+ ])
2598
+ ).nullish()
2601
2599
  }),
2602
2600
  z16.object({
2603
2601
  type: z16.literal("open_page"),
@@ -2784,7 +2782,12 @@ var openaiResponsesResponseSchema = lazyValidator8(
2784
2782
  z16.object({
2785
2783
  type: z16.literal("search"),
2786
2784
  query: z16.string().nullish(),
2787
- sources: z16.array(z16.object({ type: z16.literal("url"), url: z16.string() })).nullish()
2785
+ sources: z16.array(
2786
+ z16.discriminatedUnion("type", [
2787
+ z16.object({ type: z16.literal("url"), url: z16.string() }),
2788
+ z16.object({ type: z16.literal("api"), name: z16.string() })
2789
+ ])
2790
+ ).nullish()
2788
2791
  }),
2789
2792
  z16.object({
2790
2793
  type: z16.literal("open_page"),
@@ -4141,13 +4144,6 @@ function getResponsesModelConfig(modelId) {
4141
4144
  };
4142
4145
  }
4143
4146
  if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
4144
- if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
4145
- return {
4146
- ...defaults,
4147
- isReasoningModel: true,
4148
- systemMessageMode: "remove"
4149
- };
4150
- }
4151
4147
  return {
4152
4148
  ...defaults,
4153
4149
  isReasoningModel: true,
@@ -4548,7 +4544,7 @@ var OpenAITranscriptionModel = class {
4548
4544
  };
4549
4545
 
4550
4546
  // src/version.ts
4551
- var VERSION = true ? "2.0.59" : "0.0.0-test";
4547
+ var VERSION = true ? "2.0.61" : "0.0.0-test";
4552
4548
 
4553
4549
  // src/openai-provider.ts
4554
4550
  function createOpenAI(options = {}) {