@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.
@@ -1053,18 +1053,6 @@ function getSystemMessageMode(modelId) {
1053
1053
  return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
1054
1054
  }
1055
1055
  var reasoningModels = {
1056
- "o1-mini": {
1057
- systemMessageMode: "remove"
1058
- },
1059
- "o1-mini-2024-09-12": {
1060
- systemMessageMode: "remove"
1061
- },
1062
- "o1-preview": {
1063
- systemMessageMode: "remove"
1064
- },
1065
- "o1-preview-2024-09-12": {
1066
- systemMessageMode: "remove"
1067
- },
1068
1056
  o3: {
1069
1057
  systemMessageMode: "developer"
1070
1058
  },
@@ -2635,7 +2623,12 @@ var openaiResponsesChunkSchema = lazySchema12(
2635
2623
  z14.object({
2636
2624
  type: z14.literal("search"),
2637
2625
  query: z14.string().nullish(),
2638
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2626
+ sources: z14.array(
2627
+ z14.discriminatedUnion("type", [
2628
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2629
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2630
+ ])
2631
+ ).nullish()
2639
2632
  }),
2640
2633
  z14.object({
2641
2634
  type: z14.literal("open_page"),
@@ -2822,7 +2815,12 @@ var openaiResponsesResponseSchema = lazySchema12(
2822
2815
  z14.object({
2823
2816
  type: z14.literal("search"),
2824
2817
  query: z14.string().nullish(),
2825
- sources: z14.array(z14.object({ type: z14.literal("url"), url: z14.string() })).nullish()
2818
+ sources: z14.array(
2819
+ z14.discriminatedUnion("type", [
2820
+ z14.object({ type: z14.literal("url"), url: z14.string() }),
2821
+ z14.object({ type: z14.literal("api"), name: z14.string() })
2822
+ ])
2823
+ ).nullish()
2826
2824
  }),
2827
2825
  z14.object({
2828
2826
  type: z14.literal("open_page"),
@@ -3174,7 +3172,12 @@ var webSearchOutputSchema = lazySchema16(
3174
3172
  pattern: z18.string()
3175
3173
  })
3176
3174
  ]),
3177
- sources: z18.array(z18.object({ type: z18.literal("url"), url: z18.string() })).optional()
3175
+ sources: z18.array(
3176
+ z18.discriminatedUnion("type", [
3177
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
3178
+ z18.object({ type: z18.literal("api"), name: z18.string() })
3179
+ ])
3180
+ ).optional()
3178
3181
  })
3179
3182
  )
3180
3183
  );
@@ -4429,13 +4432,6 @@ function getResponsesModelConfig(modelId) {
4429
4432
  };
4430
4433
  }
4431
4434
  if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
4432
- if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
4433
- return {
4434
- ...defaults,
4435
- isReasoningModel: true,
4436
- systemMessageMode: "remove"
4437
- };
4438
- }
4439
4435
  return {
4440
4436
  ...defaults,
4441
4437
  isReasoningModel: true,