@ai-sdk/openai 3.0.125 → 3.0.126

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.126
4
+
5
+ ### Patch Changes
6
+
7
+ - e8ce454: fix(openai): JSON-encode custom tool input deltas for progressive UI updates
8
+
3
9
  ## 3.0.125
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -6919,6 +6919,11 @@ var OpenAIResponsesLanguageModel = class {
6919
6919
  id: value.item.call_id,
6920
6920
  toolName
6921
6921
  });
6922
+ controller.enqueue({
6923
+ type: "tool-input-delta",
6924
+ id: value.item.call_id,
6925
+ delta: '"'
6926
+ });
6922
6927
  } else if (value.item.type === "web_search_call") {
6923
6928
  ongoingToolCalls[value.output_index] = {
6924
6929
  toolName: toolNameMapping.toCustomToolName(
@@ -7207,6 +7212,11 @@ var OpenAIResponsesLanguageModel = class {
7207
7212
  const toolName = toolNameMapping.toCustomToolName(
7208
7213
  value.item.name
7209
7214
  );
7215
+ controller.enqueue({
7216
+ type: "tool-input-delta",
7217
+ id: value.item.call_id,
7218
+ delta: '"'
7219
+ });
7210
7220
  controller.enqueue({
7211
7221
  type: "tool-input-end",
7212
7222
  id: value.item.call_id
@@ -7533,7 +7543,7 @@ var OpenAIResponsesLanguageModel = class {
7533
7543
  controller.enqueue({
7534
7544
  type: "tool-input-delta",
7535
7545
  id: toolCall.toolCallId,
7536
- delta: value.delta
7546
+ delta: escapeJSONDelta(value.delta)
7537
7547
  });
7538
7548
  }
7539
7549
  } else if (isResponseApplyPatchCallOperationDiffDeltaChunk(value)) {
@@ -8298,7 +8308,7 @@ var OpenAITranscriptionModel = class {
8298
8308
  };
8299
8309
 
8300
8310
  // src/version.ts
8301
- var VERSION = true ? "3.0.125" : "0.0.0-test";
8311
+ var VERSION = true ? "3.0.126" : "0.0.0-test";
8302
8312
 
8303
8313
  // src/openai-provider.ts
8304
8314
  function createOpenAI(options = {}) {