@ai-sdk/openai 3.0.0-beta.47 → 3.0.0-beta.49

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.
@@ -1089,18 +1089,6 @@ function getSystemMessageMode(modelId) {
1089
1089
  return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
1090
1090
  }
1091
1091
  var reasoningModels = {
1092
- "o1-mini": {
1093
- systemMessageMode: "remove"
1094
- },
1095
- "o1-mini-2024-09-12": {
1096
- systemMessageMode: "remove"
1097
- },
1098
- "o1-preview": {
1099
- systemMessageMode: "remove"
1100
- },
1101
- "o1-preview-2024-09-12": {
1102
- systemMessageMode: "remove"
1103
- },
1104
1092
  o3: {
1105
1093
  systemMessageMode: "developer"
1106
1094
  },
@@ -2619,7 +2607,12 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazySchema)(
2619
2607
  import_v414.z.object({
2620
2608
  type: import_v414.z.literal("search"),
2621
2609
  query: import_v414.z.string().nullish(),
2622
- sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
2610
+ sources: import_v414.z.array(
2611
+ import_v414.z.discriminatedUnion("type", [
2612
+ import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() }),
2613
+ import_v414.z.object({ type: import_v414.z.literal("api"), name: import_v414.z.string() })
2614
+ ])
2615
+ ).nullish()
2623
2616
  }),
2624
2617
  import_v414.z.object({
2625
2618
  type: import_v414.z.literal("open_page"),
@@ -2806,7 +2799,12 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazySchema)(
2806
2799
  import_v414.z.object({
2807
2800
  type: import_v414.z.literal("search"),
2808
2801
  query: import_v414.z.string().nullish(),
2809
- sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
2802
+ sources: import_v414.z.array(
2803
+ import_v414.z.discriminatedUnion("type", [
2804
+ import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() }),
2805
+ import_v414.z.object({ type: import_v414.z.literal("api"), name: import_v414.z.string() })
2806
+ ])
2807
+ ).nullish()
2810
2808
  }),
2811
2809
  import_v414.z.object({
2812
2810
  type: import_v414.z.literal("open_page"),
@@ -3144,7 +3142,12 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
3144
3142
  pattern: import_v418.z.string()
3145
3143
  })
3146
3144
  ]),
3147
- sources: import_v418.z.array(import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() })).optional()
3145
+ sources: import_v418.z.array(
3146
+ import_v418.z.discriminatedUnion("type", [
3147
+ import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() }),
3148
+ import_v418.z.object({ type: import_v418.z.literal("api"), name: import_v418.z.string() })
3149
+ ])
3150
+ ).optional()
3148
3151
  })
3149
3152
  )
3150
3153
  );
@@ -4391,13 +4394,6 @@ function getResponsesModelConfig(modelId) {
4391
4394
  };
4392
4395
  }
4393
4396
  if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
4394
- if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
4395
- return {
4396
- ...defaults,
4397
- isReasoningModel: true,
4398
- systemMessageMode: "remove"
4399
- };
4400
- }
4401
4397
  return {
4402
4398
  ...defaults,
4403
4399
  isReasoningModel: true,