@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/index.mjs
CHANGED
|
@@ -44,7 +44,7 @@ function getOpenAILanguageModelCapabilities(modelId) {
|
|
|
44
44
|
const supportsFlexProcessing = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
45
45
|
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");
|
|
46
46
|
const isReasoningModel = !(modelId.startsWith("gpt-3") || modelId.startsWith("gpt-4") || modelId.startsWith("chatgpt-4o") || modelId.startsWith("gpt-5-chat"));
|
|
47
|
-
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1");
|
|
47
|
+
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2");
|
|
48
48
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
49
49
|
return {
|
|
50
50
|
supportsFlexProcessing,
|
|
@@ -295,10 +295,12 @@ var openaiChatResponseSchema = lazyValidator(
|
|
|
295
295
|
annotations: z2.array(
|
|
296
296
|
z2.object({
|
|
297
297
|
type: z2.literal("url_citation"),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
298
|
+
url_citation: z2.object({
|
|
299
|
+
start_index: z2.number(),
|
|
300
|
+
end_index: z2.number(),
|
|
301
|
+
url: z2.string(),
|
|
302
|
+
title: z2.string()
|
|
303
|
+
})
|
|
302
304
|
})
|
|
303
305
|
).nullish()
|
|
304
306
|
}),
|
|
@@ -362,10 +364,12 @@ var openaiChatChunkSchema = lazyValidator(
|
|
|
362
364
|
annotations: z2.array(
|
|
363
365
|
z2.object({
|
|
364
366
|
type: z2.literal("url_citation"),
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
url_citation: z2.object({
|
|
368
|
+
start_index: z2.number(),
|
|
369
|
+
end_index: z2.number(),
|
|
370
|
+
url: z2.string(),
|
|
371
|
+
title: z2.string()
|
|
372
|
+
})
|
|
369
373
|
})
|
|
370
374
|
).nullish()
|
|
371
375
|
}).nullish(),
|
|
@@ -824,8 +828,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
824
828
|
type: "source",
|
|
825
829
|
sourceType: "url",
|
|
826
830
|
id: generateId(),
|
|
827
|
-
url: annotation.url,
|
|
828
|
-
title: annotation.title
|
|
831
|
+
url: annotation.url_citation.url,
|
|
832
|
+
title: annotation.url_citation.title
|
|
829
833
|
});
|
|
830
834
|
}
|
|
831
835
|
const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
|
|
@@ -1054,8 +1058,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
1054
1058
|
type: "source",
|
|
1055
1059
|
sourceType: "url",
|
|
1056
1060
|
id: generateId(),
|
|
1057
|
-
url: annotation.url,
|
|
1058
|
-
title: annotation.title
|
|
1061
|
+
url: annotation.url_citation.url,
|
|
1062
|
+
title: annotation.url_citation.title
|
|
1059
1063
|
});
|
|
1060
1064
|
}
|
|
1061
1065
|
}
|
|
@@ -4650,7 +4654,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4650
4654
|
};
|
|
4651
4655
|
|
|
4652
4656
|
// src/version.ts
|
|
4653
|
-
var VERSION = true ? "2.0.
|
|
4657
|
+
var VERSION = true ? "2.0.87" : "0.0.0-test";
|
|
4654
4658
|
|
|
4655
4659
|
// src/openai-provider.ts
|
|
4656
4660
|
function createOpenAI(options = {}) {
|