@ai-sdk/openai 4.0.0-beta.4 → 4.0.0-beta.6
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 +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -12
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +28 -28
- package/dist/internal/index.d.ts +28 -28
- package/dist/internal/index.js +11 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -10
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +3 -0
- package/package.json +5 -5
- package/src/chat/convert-openai-chat-usage.ts +2 -2
- package/src/chat/convert-to-openai-chat-messages.ts +5 -5
- package/src/chat/map-openai-finish-reason.ts +2 -2
- package/src/chat/openai-chat-language-model.ts +22 -22
- package/src/chat/openai-chat-options.ts +1 -0
- package/src/chat/openai-chat-prepare-tools.ts +6 -6
- package/src/completion/convert-openai-completion-usage.ts +2 -2
- package/src/completion/convert-to-openai-completion-prompt.ts +2 -2
- package/src/completion/map-openai-finish-reason.ts +2 -2
- package/src/completion/openai-completion-language-model.ts +20 -20
- package/src/embedding/openai-embedding-model.ts +5 -5
- package/src/image/openai-image-model.ts +9 -9
- package/src/openai-language-model-capabilities.ts +1 -0
- package/src/openai-provider.ts +21 -21
- package/src/responses/convert-openai-responses-usage.ts +2 -2
- package/src/responses/convert-to-openai-responses-input.ts +7 -7
- package/src/responses/map-openai-responses-finish-reason.ts +2 -2
- package/src/responses/openai-responses-language-model.ts +29 -29
- package/src/responses/openai-responses-options.ts +4 -2
- package/src/responses/openai-responses-prepare-tools.ts +6 -6
- package/src/speech/openai-speech-model.ts +7 -7
- package/src/transcription/openai-transcription-model.ts +8 -8
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,
|
|
@@ -639,7 +639,7 @@ function prepareChatTools({
|
|
|
639
639
|
// src/chat/openai-chat-language-model.ts
|
|
640
640
|
var OpenAIChatLanguageModel = class {
|
|
641
641
|
constructor(modelId, config) {
|
|
642
|
-
this.specificationVersion = "
|
|
642
|
+
this.specificationVersion = "v4";
|
|
643
643
|
this.supportedUrls = {
|
|
644
644
|
"image/*": [/^https?:\/\/.*$/]
|
|
645
645
|
};
|
|
@@ -1383,7 +1383,7 @@ var openaiLanguageModelCompletionOptions = lazySchema4(
|
|
|
1383
1383
|
// src/completion/openai-completion-language-model.ts
|
|
1384
1384
|
var OpenAICompletionLanguageModel = class {
|
|
1385
1385
|
constructor(modelId, config) {
|
|
1386
|
-
this.specificationVersion = "
|
|
1386
|
+
this.specificationVersion = "v4";
|
|
1387
1387
|
this.supportedUrls = {
|
|
1388
1388
|
// No URLs are supported for completion models.
|
|
1389
1389
|
};
|
|
@@ -1655,7 +1655,7 @@ var openaiTextEmbeddingResponseSchema = lazySchema6(
|
|
|
1655
1655
|
// src/embedding/openai-embedding-model.ts
|
|
1656
1656
|
var OpenAIEmbeddingModel = class {
|
|
1657
1657
|
constructor(modelId, config) {
|
|
1658
|
-
this.specificationVersion = "
|
|
1658
|
+
this.specificationVersion = "v4";
|
|
1659
1659
|
this.maxEmbeddingsPerCall = 2048;
|
|
1660
1660
|
this.supportsParallelCalls = true;
|
|
1661
1661
|
this.modelId = modelId;
|
|
@@ -1784,7 +1784,7 @@ var OpenAIImageModel = class {
|
|
|
1784
1784
|
constructor(modelId, config) {
|
|
1785
1785
|
this.modelId = modelId;
|
|
1786
1786
|
this.config = config;
|
|
1787
|
-
this.specificationVersion = "
|
|
1787
|
+
this.specificationVersion = "v4";
|
|
1788
1788
|
}
|
|
1789
1789
|
get maxImagesPerCall() {
|
|
1790
1790
|
var _a;
|
|
@@ -4025,11 +4025,12 @@ var openaiResponsesReasoningModelIds = [
|
|
|
4025
4025
|
"gpt-5.2-chat-latest",
|
|
4026
4026
|
"gpt-5.2-pro",
|
|
4027
4027
|
"gpt-5.2-codex",
|
|
4028
|
+
"gpt-5.3-chat-latest",
|
|
4029
|
+
"gpt-5.3-codex",
|
|
4028
4030
|
"gpt-5.4",
|
|
4029
4031
|
"gpt-5.4-2026-03-05",
|
|
4030
4032
|
"gpt-5.4-pro",
|
|
4031
|
-
"gpt-5.4-pro-2026-03-05"
|
|
4032
|
-
"gpt-5.3-codex"
|
|
4033
|
+
"gpt-5.4-pro-2026-03-05"
|
|
4033
4034
|
];
|
|
4034
4035
|
var openaiResponsesModelIds = [
|
|
4035
4036
|
"gpt-4.1",
|
|
@@ -4486,7 +4487,7 @@ function extractApprovalRequestIdToToolCallIdMapping(prompt) {
|
|
|
4486
4487
|
}
|
|
4487
4488
|
var OpenAIResponsesLanguageModel = class {
|
|
4488
4489
|
constructor(modelId, config) {
|
|
4489
|
-
this.specificationVersion = "
|
|
4490
|
+
this.specificationVersion = "v4";
|
|
4490
4491
|
this.supportedUrls = {
|
|
4491
4492
|
"image/*": [/^https?:\/\/.*$/],
|
|
4492
4493
|
"application/pdf": [/^https?:\/\/.*$/]
|
|
@@ -6060,7 +6061,7 @@ var OpenAISpeechModel = class {
|
|
|
6060
6061
|
constructor(modelId, config) {
|
|
6061
6062
|
this.modelId = modelId;
|
|
6062
6063
|
this.config = config;
|
|
6063
|
-
this.specificationVersion = "
|
|
6064
|
+
this.specificationVersion = "v4";
|
|
6064
6065
|
}
|
|
6065
6066
|
get provider() {
|
|
6066
6067
|
return this.config.provider;
|
|
@@ -6296,7 +6297,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6296
6297
|
constructor(modelId, config) {
|
|
6297
6298
|
this.modelId = modelId;
|
|
6298
6299
|
this.config = config;
|
|
6299
|
-
this.specificationVersion = "
|
|
6300
|
+
this.specificationVersion = "v4";
|
|
6300
6301
|
}
|
|
6301
6302
|
get provider() {
|
|
6302
6303
|
return this.config.provider;
|
|
@@ -6400,7 +6401,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6400
6401
|
};
|
|
6401
6402
|
|
|
6402
6403
|
// src/version.ts
|
|
6403
|
-
var VERSION = true ? "4.0.0-beta.
|
|
6404
|
+
var VERSION = true ? "4.0.0-beta.6" : "0.0.0-test";
|
|
6404
6405
|
|
|
6405
6406
|
// src/openai-provider.ts
|
|
6406
6407
|
function createOpenAI(options = {}) {
|
|
@@ -6481,7 +6482,7 @@ function createOpenAI(options = {}) {
|
|
|
6481
6482
|
const provider = function(modelId) {
|
|
6482
6483
|
return createLanguageModel(modelId);
|
|
6483
6484
|
};
|
|
6484
|
-
provider.specificationVersion = "
|
|
6485
|
+
provider.specificationVersion = "v4";
|
|
6485
6486
|
provider.languageModel = createLanguageModel;
|
|
6486
6487
|
provider.chat = createChatModel;
|
|
6487
6488
|
provider.completion = createCompletionModel;
|