@ai-sdk/openai 3.0.64 → 3.0.65

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.
@@ -2737,6 +2737,7 @@ async function convertToOpenAIResponsesInput({
2737
2737
  passThroughUnsupportedFiles = false,
2738
2738
  store,
2739
2739
  hasConversation = false,
2740
+ hasPreviousResponseId = false,
2740
2741
  hasLocalShellTool = false,
2741
2742
  hasShellTool = false,
2742
2743
  hasApplyPatchTool = false,
@@ -2879,6 +2880,9 @@ async function convertToOpenAIResponsesInput({
2879
2880
  break;
2880
2881
  }
2881
2882
  if (store && id != null) {
2883
+ if (hasPreviousResponseId) {
2884
+ break;
2885
+ }
2882
2886
  input.push({ type: "item_reference", id });
2883
2887
  break;
2884
2888
  }
@@ -3023,7 +3027,7 @@ async function convertToOpenAIResponsesInput({
3023
3027
  schema: openaiResponsesReasoningProviderOptionsSchema
3024
3028
  });
3025
3029
  const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
3026
- if (hasConversation && reasoningId != null) {
3030
+ if ((hasConversation || hasPreviousResponseId) && reasoningId != null) {
3027
3031
  break;
3028
3032
  }
3029
3033
  if (reasoningId != null) {
@@ -5211,6 +5215,7 @@ var OpenAIResponsesLanguageModel = class {
5211
5215
  passThroughUnsupportedFiles: (_d = openaiOptions == null ? void 0 : openaiOptions.passThroughUnsupportedFiles) != null ? _d : false,
5212
5216
  store: (_e = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _e : true,
5213
5217
  hasConversation: (openaiOptions == null ? void 0 : openaiOptions.conversation) != null,
5218
+ hasPreviousResponseId: (openaiOptions == null ? void 0 : openaiOptions.previousResponseId) != null,
5214
5219
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
5215
5220
  hasShellTool: hasOpenAITool("openai.shell"),
5216
5221
  hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),