@ai-sdk/openai 3.0.43 → 3.0.45
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +2 -2
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +16 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -4
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +3 -0
- package/package.json +1 -1
- package/src/chat/openai-chat-options.ts +1 -0
- package/src/openai-language-model-capabilities.ts +1 -0
- package/src/responses/convert-to-openai-responses-input.ts +24 -1
- package/src/responses/openai-responses-options.ts +4 -2
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("o1") || modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
47
|
-
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2") || modelId.startsWith("gpt-5.4");
|
|
47
|
+
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2") || modelId.startsWith("gpt-5.3") || modelId.startsWith("gpt-5.4");
|
|
48
48
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
49
49
|
return {
|
|
50
50
|
supportsFlexProcessing,
|
|
@@ -2687,7 +2687,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2687
2687
|
customProviderToolNames
|
|
2688
2688
|
}) {
|
|
2689
2689
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2690
|
-
|
|
2690
|
+
let input = [];
|
|
2691
2691
|
const warnings = [];
|
|
2692
2692
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
2693
2693
|
for (const { role, content } of prompt) {
|
|
@@ -3188,6 +3188,17 @@ async function convertToOpenAIResponsesInput({
|
|
|
3188
3188
|
}
|
|
3189
3189
|
}
|
|
3190
3190
|
}
|
|
3191
|
+
if (!store && input.some(
|
|
3192
|
+
(item) => "type" in item && item.type === "reasoning" && item.encrypted_content == null
|
|
3193
|
+
)) {
|
|
3194
|
+
warnings.push({
|
|
3195
|
+
type: "other",
|
|
3196
|
+
message: "Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."
|
|
3197
|
+
});
|
|
3198
|
+
input = input.filter(
|
|
3199
|
+
(item) => !("type" in item) || item.type !== "reasoning" || item.encrypted_content != null
|
|
3200
|
+
);
|
|
3201
|
+
}
|
|
3191
3202
|
return { input, warnings };
|
|
3192
3203
|
}
|
|
3193
3204
|
var openaiResponsesReasoningProviderOptionsSchema = z19.object({
|
|
@@ -4014,11 +4025,12 @@ var openaiResponsesReasoningModelIds = [
|
|
|
4014
4025
|
"gpt-5.2-chat-latest",
|
|
4015
4026
|
"gpt-5.2-pro",
|
|
4016
4027
|
"gpt-5.2-codex",
|
|
4028
|
+
"gpt-5.3-chat-latest",
|
|
4029
|
+
"gpt-5.3-codex",
|
|
4017
4030
|
"gpt-5.4",
|
|
4018
4031
|
"gpt-5.4-2026-03-05",
|
|
4019
4032
|
"gpt-5.4-pro",
|
|
4020
|
-
"gpt-5.4-pro-2026-03-05"
|
|
4021
|
-
"gpt-5.3-codex"
|
|
4033
|
+
"gpt-5.4-pro-2026-03-05"
|
|
4022
4034
|
];
|
|
4023
4035
|
var openaiResponsesModelIds = [
|
|
4024
4036
|
"gpt-4.1",
|
|
@@ -6389,7 +6401,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6389
6401
|
};
|
|
6390
6402
|
|
|
6391
6403
|
// src/version.ts
|
|
6392
|
-
var VERSION = true ? "3.0.
|
|
6404
|
+
var VERSION = true ? "3.0.45" : "0.0.0-test";
|
|
6393
6405
|
|
|
6394
6406
|
// src/openai-provider.ts
|
|
6395
6407
|
function createOpenAI(options = {}) {
|