@ai-sdk/openai 2.0.85 → 2.0.87

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.
@@ -79,7 +79,7 @@ function getOpenAILanguageModelCapabilities(modelId) {
79
79
  const supportsFlexProcessing = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
80
80
  const supportsPriorityProcessing = modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
81
81
  const isReasoningModel = !(modelId.startsWith("gpt-3") || modelId.startsWith("gpt-4") || modelId.startsWith("chatgpt-4o") || modelId.startsWith("gpt-5-chat"));
82
- const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1");
82
+ const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2");
83
83
  const systemMessageMode = isReasoningModel ? "developer" : "system";
84
84
  return {
85
85
  supportsFlexProcessing,
@@ -325,10 +325,12 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
325
325
  annotations: import_v42.z.array(
326
326
  import_v42.z.object({
327
327
  type: import_v42.z.literal("url_citation"),
328
- start_index: import_v42.z.number(),
329
- end_index: import_v42.z.number(),
330
- url: import_v42.z.string(),
331
- title: import_v42.z.string()
328
+ url_citation: import_v42.z.object({
329
+ start_index: import_v42.z.number(),
330
+ end_index: import_v42.z.number(),
331
+ url: import_v42.z.string(),
332
+ title: import_v42.z.string()
333
+ })
332
334
  })
333
335
  ).nullish()
334
336
  }),
@@ -392,10 +394,12 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
392
394
  annotations: import_v42.z.array(
393
395
  import_v42.z.object({
394
396
  type: import_v42.z.literal("url_citation"),
395
- start_index: import_v42.z.number(),
396
- end_index: import_v42.z.number(),
397
- url: import_v42.z.string(),
398
- title: import_v42.z.string()
397
+ url_citation: import_v42.z.object({
398
+ start_index: import_v42.z.number(),
399
+ end_index: import_v42.z.number(),
400
+ url: import_v42.z.string(),
401
+ title: import_v42.z.string()
402
+ })
399
403
  })
400
404
  ).nullish()
401
405
  }).nullish(),
@@ -849,8 +853,8 @@ var OpenAIChatLanguageModel = class {
849
853
  type: "source",
850
854
  sourceType: "url",
851
855
  id: (0, import_provider_utils5.generateId)(),
852
- url: annotation.url,
853
- title: annotation.title
856
+ url: annotation.url_citation.url,
857
+ title: annotation.url_citation.title
854
858
  });
855
859
  }
856
860
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
@@ -1079,8 +1083,8 @@ var OpenAIChatLanguageModel = class {
1079
1083
  type: "source",
1080
1084
  sourceType: "url",
1081
1085
  id: (0, import_provider_utils5.generateId)(),
1082
- url: annotation.url,
1083
- title: annotation.title
1086
+ url: annotation.url_citation.url,
1087
+ title: annotation.url_citation.title
1084
1088
  });
1085
1089
  }
1086
1090
  }