@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.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -14
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +17 -13
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +17 -13
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ function getOpenAILanguageModelCapabilities(modelId) {
|
|
|
36
36
|
const supportsFlexProcessing = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
37
37
|
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");
|
|
38
38
|
const isReasoningModel = !(modelId.startsWith("gpt-3") || modelId.startsWith("gpt-4") || modelId.startsWith("chatgpt-4o") || modelId.startsWith("gpt-5-chat"));
|
|
39
|
-
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1");
|
|
39
|
+
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2");
|
|
40
40
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
41
41
|
return {
|
|
42
42
|
supportsFlexProcessing,
|
|
@@ -287,10 +287,12 @@ var openaiChatResponseSchema = lazyValidator(
|
|
|
287
287
|
annotations: z2.array(
|
|
288
288
|
z2.object({
|
|
289
289
|
type: z2.literal("url_citation"),
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
url_citation: z2.object({
|
|
291
|
+
start_index: z2.number(),
|
|
292
|
+
end_index: z2.number(),
|
|
293
|
+
url: z2.string(),
|
|
294
|
+
title: z2.string()
|
|
295
|
+
})
|
|
294
296
|
})
|
|
295
297
|
).nullish()
|
|
296
298
|
}),
|
|
@@ -354,10 +356,12 @@ var openaiChatChunkSchema = lazyValidator(
|
|
|
354
356
|
annotations: z2.array(
|
|
355
357
|
z2.object({
|
|
356
358
|
type: z2.literal("url_citation"),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
url_citation: z2.object({
|
|
360
|
+
start_index: z2.number(),
|
|
361
|
+
end_index: z2.number(),
|
|
362
|
+
url: z2.string(),
|
|
363
|
+
title: z2.string()
|
|
364
|
+
})
|
|
361
365
|
})
|
|
362
366
|
).nullish()
|
|
363
367
|
}).nullish(),
|
|
@@ -816,8 +820,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
816
820
|
type: "source",
|
|
817
821
|
sourceType: "url",
|
|
818
822
|
id: generateId(),
|
|
819
|
-
url: annotation.url,
|
|
820
|
-
title: annotation.title
|
|
823
|
+
url: annotation.url_citation.url,
|
|
824
|
+
title: annotation.url_citation.title
|
|
821
825
|
});
|
|
822
826
|
}
|
|
823
827
|
const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
|
|
@@ -1046,8 +1050,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
1046
1050
|
type: "source",
|
|
1047
1051
|
sourceType: "url",
|
|
1048
1052
|
id: generateId(),
|
|
1049
|
-
url: annotation.url,
|
|
1050
|
-
title: annotation.title
|
|
1053
|
+
url: annotation.url_citation.url,
|
|
1054
|
+
title: annotation.url_citation.title
|
|
1051
1055
|
});
|
|
1052
1056
|
}
|
|
1053
1057
|
}
|