@ai-sdk/openai 2.0.93 → 2.0.95
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 +19 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +4 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +4 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.0.95
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b08351e: fix(openai): allow null/undefined type in streaming tool call deltas
|
|
8
|
+
|
|
9
|
+
Azure AI Foundry and Mistral deployed on Azure omit the `type` field in
|
|
10
|
+
streaming tool_calls deltas. The chat stream parser now accepts a missing
|
|
11
|
+
`type` field (treating it as `"function"`) instead of throwing
|
|
12
|
+
`InvalidResponseDataError: Expected 'function' type.`
|
|
13
|
+
|
|
14
|
+
Fixes #12770
|
|
15
|
+
|
|
16
|
+
## 2.0.94
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 42815ac: feat(provider/openai): add `gpt-5.3-codex`
|
|
21
|
+
|
|
3
22
|
## 2.0.93
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -329,7 +329,7 @@ declare const openaiTools: {
|
|
|
329
329
|
}>;
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
332
|
+
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-codex' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
333
333
|
declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
|
|
334
334
|
conversation?: string | null | undefined;
|
|
335
335
|
include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -329,7 +329,7 @@ declare const openaiTools: {
|
|
|
329
329
|
}>;
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
332
|
+
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-codex' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
333
333
|
declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
|
|
334
334
|
conversation?: string | null | undefined;
|
|
335
335
|
include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -971,7 +971,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
971
971
|
for (const toolCallDelta of delta.tool_calls) {
|
|
972
972
|
const index = toolCallDelta.index;
|
|
973
973
|
if (toolCalls[index] == null) {
|
|
974
|
-
if (toolCallDelta.type !== "function") {
|
|
974
|
+
if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
|
|
975
975
|
throw new import_provider3.InvalidResponseDataError({
|
|
976
976
|
data: toolCallDelta,
|
|
977
977
|
message: `Expected 'function' type.`
|
|
@@ -2925,7 +2925,9 @@ var openaiResponsesReasoningModelIds = [
|
|
|
2925
2925
|
"gpt-5.1-codex-max",
|
|
2926
2926
|
"gpt-5.2",
|
|
2927
2927
|
"gpt-5.2-chat-latest",
|
|
2928
|
-
"gpt-5.2-pro"
|
|
2928
|
+
"gpt-5.2-pro",
|
|
2929
|
+
"gpt-5.2-codex",
|
|
2930
|
+
"gpt-5.3-codex"
|
|
2929
2931
|
];
|
|
2930
2932
|
var openaiResponsesModelIds = [
|
|
2931
2933
|
"gpt-4.1",
|
|
@@ -4604,7 +4606,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4604
4606
|
};
|
|
4605
4607
|
|
|
4606
4608
|
// src/version.ts
|
|
4607
|
-
var VERSION = true ? "2.0.
|
|
4609
|
+
var VERSION = true ? "2.0.95" : "0.0.0-test";
|
|
4608
4610
|
|
|
4609
4611
|
// src/openai-provider.ts
|
|
4610
4612
|
function createOpenAI(options = {}) {
|