@ai-sdk/openai 3.0.35 → 3.0.36
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 +13 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/chat/openai-chat-language-model.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.36
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 53bdfa5: 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
|
+
|
|
3
16
|
## 3.0.35
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1014,7 +1014,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
1014
1014
|
for (const toolCallDelta of delta.tool_calls) {
|
|
1015
1015
|
const index = toolCallDelta.index;
|
|
1016
1016
|
if (toolCalls[index] == null) {
|
|
1017
|
-
if (toolCallDelta.type !== "function") {
|
|
1017
|
+
if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
|
|
1018
1018
|
throw new import_provider3.InvalidResponseDataError({
|
|
1019
1019
|
data: toolCallDelta,
|
|
1020
1020
|
message: `Expected 'function' type.`
|
|
@@ -6097,7 +6097,7 @@ var OpenAITranscriptionModel = class {
|
|
|
6097
6097
|
};
|
|
6098
6098
|
|
|
6099
6099
|
// src/version.ts
|
|
6100
|
-
var VERSION = true ? "3.0.
|
|
6100
|
+
var VERSION = true ? "3.0.36" : "0.0.0-test";
|
|
6101
6101
|
|
|
6102
6102
|
// src/openai-provider.ts
|
|
6103
6103
|
function createOpenAI(options = {}) {
|