@ai-sdk/openai 4.0.94 → 4.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 +9 -0
- package/dist/index.js +4 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +3 -12
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- package/src/responses/openai-responses-language-model.ts +2 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.95
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 130e871: Restore raw OpenAI custom-tool input deltas for consumers that forward them to Responses API clients. Mark streamed input with `inputEncoding: 'text'` so UI clients can display it progressively without JSON parsing. Preserve the encoding when partial UI messages are saved and resumed. Final provider tool-call inputs remain JSON-encoded.
|
|
8
|
+
- Updated dependencies [130e871]
|
|
9
|
+
- @ai-sdk/provider@4.0.28
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.61
|
|
11
|
+
|
|
3
12
|
## 4.0.94
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -7032,12 +7032,8 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
7032
7032
|
controller.enqueue({
|
|
7033
7033
|
type: "tool-input-start",
|
|
7034
7034
|
id: value.item.call_id,
|
|
7035
|
-
toolName
|
|
7036
|
-
|
|
7037
|
-
controller.enqueue({
|
|
7038
|
-
type: "tool-input-delta",
|
|
7039
|
-
id: value.item.call_id,
|
|
7040
|
-
delta: "\""
|
|
7035
|
+
toolName,
|
|
7036
|
+
inputEncoding: "text"
|
|
7041
7037
|
});
|
|
7042
7038
|
} else if (value.item.type === "web_search_call") {
|
|
7043
7039
|
ongoingToolCalls[value.output_index] = {
|
|
@@ -7313,11 +7309,6 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
7313
7309
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7314
7310
|
hasFunctionCall = true;
|
|
7315
7311
|
const toolName = toolNameMapping.toCustomToolName(value.item.name);
|
|
7316
|
-
controller.enqueue({
|
|
7317
|
-
type: "tool-input-delta",
|
|
7318
|
-
id: value.item.call_id,
|
|
7319
|
-
delta: "\""
|
|
7320
|
-
});
|
|
7321
7312
|
controller.enqueue({
|
|
7322
7313
|
type: "tool-input-end",
|
|
7323
7314
|
id: value.item.call_id
|
|
@@ -7645,7 +7636,7 @@ var OpenAIResponsesLanguageModel = class OpenAIResponsesLanguageModel {
|
|
|
7645
7636
|
if (toolCall != null) controller.enqueue({
|
|
7646
7637
|
type: "tool-input-delta",
|
|
7647
7638
|
id: toolCall.toolCallId,
|
|
7648
|
-
delta:
|
|
7639
|
+
delta: value.delta
|
|
7649
7640
|
});
|
|
7650
7641
|
} else if (isResponseApplyPatchCallOperationDiffDeltaChunk(value)) {
|
|
7651
7642
|
const toolCall = ongoingToolCalls[value.output_index];
|
|
@@ -10171,7 +10162,7 @@ var OpenAISkills = class {
|
|
|
10171
10162
|
};
|
|
10172
10163
|
//#endregion
|
|
10173
10164
|
//#region src/version.ts
|
|
10174
|
-
const VERSION = "4.0.
|
|
10165
|
+
const VERSION = "4.0.95";
|
|
10175
10166
|
//#endregion
|
|
10176
10167
|
//#region src/openai-provider.ts
|
|
10177
10168
|
/**
|