@ai-sdk/openai 3.0.0-beta.25 → 3.0.0-beta.26

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.0-beta.26
4
+
5
+ ### Patch Changes
6
+
7
+ - edc5548: feat(provider/openai): automatically add reasoning.encrypted_content include when store = false
8
+
3
9
  ## 3.0.0-beta.25
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2894,6 +2894,7 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazySchem
2894
2894
  include: import_v417.z.array(
2895
2895
  import_v417.z.enum([
2896
2896
  "reasoning.encrypted_content",
2897
+ // handled internally by default, only needed for unknown reasoning models
2897
2898
  "file_search_call.results",
2898
2899
  "message.output_text.logprobs"
2899
2900
  ])
@@ -3144,7 +3145,11 @@ var OpenAIResponsesLanguageModel = class {
3144
3145
  const strictJsonSchema = (_b = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _b : false;
3145
3146
  let include = openaiOptions == null ? void 0 : openaiOptions.include;
3146
3147
  function addInclude(key) {
3147
- include = include != null ? [...include, key] : [key];
3148
+ if (include == null) {
3149
+ include = [key];
3150
+ } else if (!include.includes(key)) {
3151
+ include = [...include, key];
3152
+ }
3148
3153
  }
3149
3154
  function hasOpenAITool(id) {
3150
3155
  return (tools == null ? void 0 : tools.find(
@@ -3164,6 +3169,10 @@ var OpenAIResponsesLanguageModel = class {
3164
3169
  if (hasOpenAITool("openai.code_interpreter")) {
3165
3170
  addInclude("code_interpreter_call.outputs");
3166
3171
  }
3172
+ const store = openaiOptions == null ? void 0 : openaiOptions.store;
3173
+ if (store === false && modelConfig.isReasoningModel) {
3174
+ addInclude("reasoning.encrypted_content");
3175
+ }
3167
3176
  const baseArgs = {
3168
3177
  model: this.modelId,
3169
3178
  input,
@@ -3191,7 +3200,7 @@ var OpenAIResponsesLanguageModel = class {
3191
3200
  metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,
3192
3201
  parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,
3193
3202
  previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,
3194
- store: openaiOptions == null ? void 0 : openaiOptions.store,
3203
+ store,
3195
3204
  user: openaiOptions == null ? void 0 : openaiOptions.user,
3196
3205
  instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,
3197
3206
  service_tier: openaiOptions == null ? void 0 : openaiOptions.serviceTier,
@@ -4432,7 +4441,7 @@ var OpenAITranscriptionModel = class {
4432
4441
  };
4433
4442
 
4434
4443
  // src/version.ts
4435
- var VERSION = true ? "3.0.0-beta.25" : "0.0.0-test";
4444
+ var VERSION = true ? "3.0.0-beta.26" : "0.0.0-test";
4436
4445
 
4437
4446
  // src/openai-provider.ts
4438
4447
  function createOpenAI(options = {}) {