@ai-sdk/openai 3.0.86 → 3.0.87

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.87
4
+
5
+ ### Patch Changes
6
+
7
+ - 2f11af1: Preserve stored tool search output item IDs from provider metadata.
8
+
3
9
  ## 3.0.86
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2984,7 +2984,7 @@ async function convertToOpenAIResponsesInput({
2984
2984
  hasApplyPatchTool = false,
2985
2985
  customProviderToolNames
2986
2986
  }) {
2987
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
2987
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
2988
2988
  let input = [];
2989
2989
  const warnings = [];
2990
2990
  const processedApprovalIds = /* @__PURE__ */ new Set();
@@ -3261,7 +3261,7 @@ async function convertToOpenAIResponsesInput({
3261
3261
  part.toolName
3262
3262
  );
3263
3263
  if (resolvedResultToolName === "tool_search") {
3264
- const itemId = (_p = (_o = (_n = part.providerOptions) == null ? void 0 : _n[providerOptionsName]) == null ? void 0 : _o.itemId) != null ? _p : part.toolCallId;
3264
+ const itemId = (_s = (_r = (_o = (_n = part.providerOptions) == null ? void 0 : _n[providerOptionsName]) == null ? void 0 : _o.itemId) != null ? _r : (_q = (_p = part.providerMetadata) == null ? void 0 : _p[providerOptionsName]) == null ? void 0 : _q.itemId) != null ? _s : part.toolCallId;
3265
3265
  if (store) {
3266
3266
  input.push({ type: "item_reference", id: itemId });
3267
3267
  } else if (part.output.type === "json") {
@@ -3302,7 +3302,7 @@ async function convertToOpenAIResponsesInput({
3302
3302
  break;
3303
3303
  }
3304
3304
  if (store) {
3305
- const itemId = (_s = (_r = (_q = part.providerOptions) == null ? void 0 : _q[providerOptionsName]) == null ? void 0 : _r.itemId) != null ? _s : part.toolCallId;
3305
+ const itemId = (_v = (_u = (_t = part.providerOptions) == null ? void 0 : _t[providerOptionsName]) == null ? void 0 : _u.itemId) != null ? _v : part.toolCallId;
3306
3306
  input.push({ type: "item_reference", id: itemId });
3307
3307
  } else {
3308
3308
  warnings.push({
@@ -3412,7 +3412,7 @@ async function convertToOpenAIResponsesInput({
3412
3412
  }
3413
3413
  const output = part.output;
3414
3414
  if (output.type === "execution-denied") {
3415
- const approvalId = (_u = (_t = output.providerOptions) == null ? void 0 : _t.openai) == null ? void 0 : _u.approvalId;
3415
+ const approvalId = (_x = (_w = output.providerOptions) == null ? void 0 : _w.openai) == null ? void 0 : _x.approvalId;
3416
3416
  if (approvalId) {
3417
3417
  continue;
3418
3418
  }
@@ -3486,7 +3486,7 @@ async function convertToOpenAIResponsesInput({
3486
3486
  outputValue = output.value;
3487
3487
  break;
3488
3488
  case "execution-denied":
3489
- outputValue = (_v = output.reason) != null ? _v : "Tool call execution denied.";
3489
+ outputValue = (_y = output.reason) != null ? _y : "Tool call execution denied.";
3490
3490
  break;
3491
3491
  case "json":
3492
3492
  case "error-json":
@@ -3569,7 +3569,7 @@ async function convertToOpenAIResponsesInput({
3569
3569
  contentValue = output.value;
3570
3570
  break;
3571
3571
  case "execution-denied":
3572
- contentValue = (_w = output.reason) != null ? _w : "Tool call execution denied.";
3572
+ contentValue = (_z = output.reason) != null ? _z : "Tool call execution denied.";
3573
3573
  break;
3574
3574
  case "json":
3575
3575
  case "error-json":
@@ -7330,7 +7330,7 @@ var OpenAITranscriptionModel = class {
7330
7330
  };
7331
7331
 
7332
7332
  // src/version.ts
7333
- var VERSION = true ? "3.0.86" : "0.0.0-test";
7333
+ var VERSION = true ? "3.0.87" : "0.0.0-test";
7334
7334
 
7335
7335
  // src/openai-provider.ts
7336
7336
  function createOpenAI(options = {}) {