@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.65
4
+
5
+ ### Patch Changes
6
+
7
+ - eb52378: fix(openai): skip passing reasoning items when using previous response id
8
+
3
9
  ## 3.0.64
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2744,6 +2744,7 @@ async function convertToOpenAIResponsesInput({
2744
2744
  passThroughUnsupportedFiles = false,
2745
2745
  store,
2746
2746
  hasConversation = false,
2747
+ hasPreviousResponseId = false,
2747
2748
  hasLocalShellTool = false,
2748
2749
  hasShellTool = false,
2749
2750
  hasApplyPatchTool = false,
@@ -2886,6 +2887,9 @@ async function convertToOpenAIResponsesInput({
2886
2887
  break;
2887
2888
  }
2888
2889
  if (store && id != null) {
2890
+ if (hasPreviousResponseId) {
2891
+ break;
2892
+ }
2889
2893
  input.push({ type: "item_reference", id });
2890
2894
  break;
2891
2895
  }
@@ -3030,7 +3034,7 @@ async function convertToOpenAIResponsesInput({
3030
3034
  schema: openaiResponsesReasoningProviderOptionsSchema
3031
3035
  });
3032
3036
  const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
3033
- if (hasConversation && reasoningId != null) {
3037
+ if ((hasConversation || hasPreviousResponseId) && reasoningId != null) {
3034
3038
  break;
3035
3039
  }
3036
3040
  if (reasoningId != null) {
@@ -4863,6 +4867,7 @@ var OpenAIResponsesLanguageModel = class {
4863
4867
  passThroughUnsupportedFiles: (_d = openaiOptions == null ? void 0 : openaiOptions.passThroughUnsupportedFiles) != null ? _d : false,
4864
4868
  store: (_e = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _e : true,
4865
4869
  hasConversation: (openaiOptions == null ? void 0 : openaiOptions.conversation) != null,
4870
+ hasPreviousResponseId: (openaiOptions == null ? void 0 : openaiOptions.previousResponseId) != null,
4866
4871
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
4867
4872
  hasShellTool: hasOpenAITool("openai.shell"),
4868
4873
  hasApplyPatchTool: hasOpenAITool("openai.apply_patch"),
@@ -6800,7 +6805,7 @@ var OpenAITranscriptionModel = class {
6800
6805
  };
6801
6806
 
6802
6807
  // src/version.ts
6803
- var VERSION = true ? "3.0.64" : "0.0.0-test";
6808
+ var VERSION = true ? "3.0.65" : "0.0.0-test";
6804
6809
 
6805
6810
  // src/openai-provider.ts
6806
6811
  function createOpenAI(options = {}) {