@ai-sdk/openai 3.0.58 → 3.0.60
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 +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- 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 +5 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -3
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +1 -0
- package/package.json +1 -1
- package/src/chat/convert-to-openai-chat-messages.ts +1 -1
- package/src/chat/openai-chat-options.ts +2 -0
- package/src/openai-language-model-capabilities.ts +3 -2
- package/src/responses/openai-responses-options.ts +4 -0
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") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") && !modelId.startsWith("gpt-5.4-nano") || 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.3") || 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") || modelId.startsWith("gpt-5.5");
|
|
40
40
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
41
41
|
return {
|
|
42
42
|
supportsFlexProcessing,
|
|
@@ -233,7 +233,7 @@ function convertToOpenAIChatMessages({
|
|
|
233
233
|
}
|
|
234
234
|
messages.push({
|
|
235
235
|
role: "assistant",
|
|
236
|
-
content: text || null,
|
|
236
|
+
content: toolCalls.length > 0 ? text || null : text,
|
|
237
237
|
tool_calls: toolCalls.length > 0 ? toolCalls : void 0
|
|
238
238
|
});
|
|
239
239
|
break;
|
|
@@ -4241,7 +4241,9 @@ var openaiResponsesReasoningModelIds = [
|
|
|
4241
4241
|
"gpt-5.4-nano",
|
|
4242
4242
|
"gpt-5.4-nano-2026-03-17",
|
|
4243
4243
|
"gpt-5.4-pro",
|
|
4244
|
-
"gpt-5.4-pro-2026-03-05"
|
|
4244
|
+
"gpt-5.4-pro-2026-03-05",
|
|
4245
|
+
"gpt-5.5",
|
|
4246
|
+
"gpt-5.5-2026-04-23"
|
|
4245
4247
|
];
|
|
4246
4248
|
var openaiResponsesModelIds = [
|
|
4247
4249
|
"gpt-4.1",
|