@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/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("o1") || modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
39
|
-
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2") || modelId.startsWith("gpt-5.4");
|
|
39
|
+
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2") || modelId.startsWith("gpt-5.3") || modelId.startsWith("gpt-5.4");
|
|
40
40
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
41
41
|
return {
|
|
42
42
|
supportsFlexProcessing,
|
|
@@ -2589,7 +2589,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2589
2589
|
customProviderToolNames
|
|
2590
2590
|
}) {
|
|
2591
2591
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2592
|
-
|
|
2592
|
+
let input = [];
|
|
2593
2593
|
const warnings = [];
|
|
2594
2594
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
2595
2595
|
for (const { role, content } of prompt) {
|
|
@@ -3090,6 +3090,17 @@ async function convertToOpenAIResponsesInput({
|
|
|
3090
3090
|
}
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
|
+
if (!store && input.some(
|
|
3094
|
+
(item) => "type" in item && item.type === "reasoning" && item.encrypted_content == null
|
|
3095
|
+
)) {
|
|
3096
|
+
warnings.push({
|
|
3097
|
+
type: "other",
|
|
3098
|
+
message: "Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."
|
|
3099
|
+
});
|
|
3100
|
+
input = input.filter(
|
|
3101
|
+
(item) => !("type" in item) || item.type !== "reasoning" || item.encrypted_content != null
|
|
3102
|
+
);
|
|
3103
|
+
}
|
|
3093
3104
|
return { input, warnings };
|
|
3094
3105
|
}
|
|
3095
3106
|
var openaiResponsesReasoningProviderOptionsSchema = z15.object({
|
|
@@ -3916,11 +3927,12 @@ var openaiResponsesReasoningModelIds = [
|
|
|
3916
3927
|
"gpt-5.2-chat-latest",
|
|
3917
3928
|
"gpt-5.2-pro",
|
|
3918
3929
|
"gpt-5.2-codex",
|
|
3930
|
+
"gpt-5.3-chat-latest",
|
|
3931
|
+
"gpt-5.3-codex",
|
|
3919
3932
|
"gpt-5.4",
|
|
3920
3933
|
"gpt-5.4-2026-03-05",
|
|
3921
3934
|
"gpt-5.4-pro",
|
|
3922
|
-
"gpt-5.4-pro-2026-03-05"
|
|
3923
|
-
"gpt-5.3-codex"
|
|
3935
|
+
"gpt-5.4-pro-2026-03-05"
|
|
3924
3936
|
];
|
|
3925
3937
|
var openaiResponsesModelIds = [
|
|
3926
3938
|
"gpt-4.1",
|