@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.
@@ -1055,18 +1055,6 @@ function getSystemMessageMode(modelId) {
1055
1055
  return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
1056
1056
  }
1057
1057
  var reasoningModels = {
1058
- "o1-mini": {
1059
- systemMessageMode: "remove"
1060
- },
1061
- "o1-mini-2024-09-12": {
1062
- systemMessageMode: "remove"
1063
- },
1064
- "o1-preview": {
1065
- systemMessageMode: "remove"
1066
- },
1067
- "o1-preview-2024-09-12": {
1068
- systemMessageMode: "remove"
1069
- },
1070
1058
  o3: {
1071
1059
  systemMessageMode: "developer"
1072
1060
  },
@@ -2640,7 +2628,12 @@ var openaiResponsesChunkSchema = lazyValidator11(
2640
2628
  z14.object({
2641
2629
  type: z14.literal("search"),
2642
2630
  query: z14.string().nullish(),
2643
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2631
+ sources: z14.array(
2632
+ z14.discriminatedUnion("type", [
2633
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2634
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2635
+ ])
2636
+ ).nullish()
2644
2637
  }),
2645
2638
  z14.object({
2646
2639
  type: z14.literal("open_page"),
@@ -2827,7 +2820,12 @@ var openaiResponsesResponseSchema = lazyValidator11(
2827
2820
  z14.object({
2828
2821
  type: z14.literal("search"),
2829
2822
  query: z14.string().nullish(),
2830
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2823
+ sources: z14.array(
2824
+ z14.discriminatedUnion("type", [
2825
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2826
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2827
+ ])
2828
+ ).nullish()
2831
2829
  }),
2832
2830
  z14.object({
2833
2831
  type: z14.literal("open_page"),
@@ -3182,7 +3180,12 @@ var webSearchOutputSchema = lazySchema4(
3182
3180
  pattern: z18.string()
3183
3181
  })
3184
3182
  ]),
3185
- sources: z18.array(z18.object({ type: z18.literal("url"), url: z18.string() })).optional()
3183
+ sources: z18.array(
3184
+ z18.discriminatedUnion("type", [
3185
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
3186
+ z18.object({ type: z18.literal("api"), name: z18.string() })
3187
+ ])
3188
+ ).optional()
3186
3189
  })
3187
3190
  )
3188
3191
  );
@@ -4433,13 +4436,6 @@ function getResponsesModelConfig(modelId) {
4433
4436
  };
4434
4437
  }
4435
4438
  if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
4436
- if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
4437
- return {
4438
- ...defaults,
4439
- isReasoningModel: true,
4440
- systemMessageMode: "remove"
4441
- };
4442
- }
4443
4439
  return {
4444
4440
  ...defaults,
4445
4441
  isReasoningModel: true,