@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.
@@ -1085,18 +1085,6 @@ function getSystemMessageMode(modelId) {
1085
1085
  return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
1086
1086
  }
1087
1087
  var reasoningModels = {
1088
- "o1-mini": {
1089
- systemMessageMode: "remove"
1090
- },
1091
- "o1-mini-2024-09-12": {
1092
- systemMessageMode: "remove"
1093
- },
1094
- "o1-preview": {
1095
- systemMessageMode: "remove"
1096
- },
1097
- "o1-preview-2024-09-12": {
1098
- systemMessageMode: "remove"
1099
- },
1100
1088
  o3: {
1101
1089
  systemMessageMode: "developer"
1102
1090
  },
@@ -2601,7 +2589,12 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2601
2589
  import_v414.z.object({
2602
2590
  type: import_v414.z.literal("search"),
2603
2591
  query: import_v414.z.string().nullish(),
2604
- sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
2592
+ sources: import_v414.z.array(
2593
+ import_v414.z.discriminatedUnion("type", [
2594
+ import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() }),
2595
+ import_v414.z.object({ type: import_v414.z.literal("api"), name: import_v414.z.string() })
2596
+ ])
2597
+ ).nullish()
2605
2598
  }),
2606
2599
  import_v414.z.object({
2607
2600
  type: import_v414.z.literal("open_page"),
@@ -2788,7 +2781,12 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
2788
2781
  import_v414.z.object({
2789
2782
  type: import_v414.z.literal("search"),
2790
2783
  query: import_v414.z.string().nullish(),
2791
- sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
2784
+ sources: import_v414.z.array(
2785
+ import_v414.z.discriminatedUnion("type", [
2786
+ import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() }),
2787
+ import_v414.z.object({ type: import_v414.z.literal("api"), name: import_v414.z.string() })
2788
+ ])
2789
+ ).nullish()
2792
2790
  }),
2793
2791
  import_v414.z.object({
2794
2792
  type: import_v414.z.literal("open_page"),
@@ -3126,7 +3124,12 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
3126
3124
  pattern: import_v418.z.string()
3127
3125
  })
3128
3126
  ]),
3129
- sources: import_v418.z.array(import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() })).optional()
3127
+ sources: import_v418.z.array(
3128
+ import_v418.z.discriminatedUnion("type", [
3129
+ import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() }),
3130
+ import_v418.z.object({ type: import_v418.z.literal("api"), name: import_v418.z.string() })
3131
+ ])
3132
+ ).optional()
3130
3133
  })
3131
3134
  )
3132
3135
  );
@@ -4369,13 +4372,6 @@ function getResponsesModelConfig(modelId) {
4369
4372
  };
4370
4373
  }
4371
4374
  if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
4372
- if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
4373
- return {
4374
- ...defaults,
4375
- isReasoningModel: true,
4376
- systemMessageMode: "remove"
4377
- };
4378
- }
4379
4375
  return {
4380
4376
  ...defaults,
4381
4377
  isReasoningModel: true,