@ai-sdk/openai 3.0.67 → 3.0.68

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.
@@ -2743,7 +2743,7 @@ async function convertToOpenAIResponsesInput({
2743
2743
  hasApplyPatchTool = false,
2744
2744
  customProviderToolNames
2745
2745
  }) {
2746
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
2746
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
2747
2747
  let input = [];
2748
2748
  const warnings = [];
2749
2749
  const processedApprovalIds = /* @__PURE__ */ new Set();
@@ -2844,6 +2844,7 @@ async function convertToOpenAIResponsesInput({
2844
2844
  }
2845
2845
  case "tool-call": {
2846
2846
  const id = (_f = (_c = (_b = part.providerOptions) == null ? void 0 : _b[providerOptionsName]) == null ? void 0 : _c.itemId) != null ? _f : (_e = (_d = part.providerMetadata) == null ? void 0 : _d[providerOptionsName]) == null ? void 0 : _e.itemId;
2847
+ const namespace = (_k = (_h = (_g = part.providerOptions) == null ? void 0 : _g[providerOptionsName]) == null ? void 0 : _h.namespace) != null ? _k : (_j = (_i = part.providerMetadata) == null ? void 0 : _i[providerOptionsName]) == null ? void 0 : _j.namespace;
2847
2848
  if (hasConversation && id != null) {
2848
2849
  break;
2849
2850
  }
@@ -2867,7 +2868,7 @@ async function convertToOpenAIResponsesInput({
2867
2868
  type: "tool_search_call",
2868
2869
  id: id != null ? id : part.toolCallId,
2869
2870
  execution,
2870
- call_id: (_g = parsedInput.call_id) != null ? _g : null,
2871
+ call_id: (_l = parsedInput.call_id) != null ? _l : null,
2871
2872
  status: "completed",
2872
2873
  arguments: parsedInput.arguments
2873
2874
  });
@@ -2953,7 +2954,8 @@ async function convertToOpenAIResponsesInput({
2953
2954
  call_id: part.toolCallId,
2954
2955
  name: resolvedToolName,
2955
2956
  arguments: serializeToolCallArguments2(part.input),
2956
- id
2957
+ id,
2958
+ ...namespace != null && { namespace }
2957
2959
  });
2958
2960
  break;
2959
2961
  }
@@ -2969,7 +2971,7 @@ async function convertToOpenAIResponsesInput({
2969
2971
  part.toolName
2970
2972
  );
2971
2973
  if (resolvedResultToolName === "tool_search") {
2972
- const itemId = (_j = (_i = (_h = part.providerOptions) == null ? void 0 : _h[providerOptionsName]) == null ? void 0 : _i.itemId) != null ? _j : part.toolCallId;
2974
+ const itemId = (_o = (_n = (_m = part.providerOptions) == null ? void 0 : _m[providerOptionsName]) == null ? void 0 : _n.itemId) != null ? _o : part.toolCallId;
2973
2975
  if (store) {
2974
2976
  input.push({ type: "item_reference", id: itemId });
2975
2977
  } else if (part.output.type === "json") {
@@ -3010,7 +3012,7 @@ async function convertToOpenAIResponsesInput({
3010
3012
  break;
3011
3013
  }
3012
3014
  if (store) {
3013
- const itemId = (_m = (_l = (_k = part.providerOptions) == null ? void 0 : _k[providerOptionsName]) == null ? void 0 : _l.itemId) != null ? _m : part.toolCallId;
3015
+ const itemId = (_r = (_q = (_p = part.providerOptions) == null ? void 0 : _p[providerOptionsName]) == null ? void 0 : _q.itemId) != null ? _r : part.toolCallId;
3014
3016
  input.push({ type: "item_reference", id: itemId });
3015
3017
  } else {
3016
3018
  warnings.push({
@@ -3120,7 +3122,7 @@ async function convertToOpenAIResponsesInput({
3120
3122
  }
3121
3123
  const output = part.output;
3122
3124
  if (output.type === "execution-denied") {
3123
- const approvalId = (_o = (_n = output.providerOptions) == null ? void 0 : _n.openai) == null ? void 0 : _o.approvalId;
3125
+ const approvalId = (_t = (_s = output.providerOptions) == null ? void 0 : _s.openai) == null ? void 0 : _t.approvalId;
3124
3126
  if (approvalId) {
3125
3127
  continue;
3126
3128
  }
@@ -3194,7 +3196,7 @@ async function convertToOpenAIResponsesInput({
3194
3196
  outputValue = output.value;
3195
3197
  break;
3196
3198
  case "execution-denied":
3197
- outputValue = (_p = output.reason) != null ? _p : "Tool execution denied.";
3199
+ outputValue = (_u = output.reason) != null ? _u : "Tool execution denied.";
3198
3200
  break;
3199
3201
  case "json":
3200
3202
  case "error-json":
@@ -3255,7 +3257,7 @@ async function convertToOpenAIResponsesInput({
3255
3257
  contentValue = output.value;
3256
3258
  break;
3257
3259
  case "execution-denied":
3258
- contentValue = (_q = output.reason) != null ? _q : "Tool execution denied.";
3260
+ contentValue = (_v = output.reason) != null ? _v : "Tool execution denied.";
3259
3261
  break;
3260
3262
  case "json":
3261
3263
  case "error-json":