@ai-sdk/openai 3.0.93 → 3.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.
@@ -3179,10 +3179,10 @@ async function convertToOpenAIResponsesInput({
3179
3179
  }
3180
3180
  break;
3181
3181
  }
3182
- if (hasPreviousResponseId && store && id != null) {
3182
+ const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3183
+ if (hasPreviousResponseId && store && id != null && isProviderDefinedToolCall) {
3183
3184
  break;
3184
3185
  }
3185
- const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || ((_m = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _m : false);
3186
3186
  if (store && id != null && isProviderDefinedToolCall) {
3187
3187
  input.push({ type: "item_reference", id });
3188
3188
  break;
@@ -3406,7 +3406,7 @@ async function convertToOpenAIResponsesInput({
3406
3406
  continue;
3407
3407
  }
3408
3408
  processedApprovalIds.add(approvalResponse.approvalId);
3409
- if (store) {
3409
+ if (store && !hasConversation && !hasPreviousResponseId) {
3410
3410
  input.push({
3411
3411
  type: "item_reference",
3412
3412
  id: approvalResponse.approvalId