@ai-sdk/openai 2.0.48 → 2.0.49

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
+ ## 2.0.49
4
+
5
+ ### Patch Changes
6
+
7
+ - f4287d0: feat(provider/openai): automatically add reasoning.encrypted_content include when store = false
8
+
3
9
  ## 2.0.48
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2882,6 +2882,7 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValid
2882
2882
  include: import_v417.z.array(
2883
2883
  import_v417.z.enum([
2884
2884
  "reasoning.encrypted_content",
2885
+ // handled internally by default, only needed for unknown reasoning models
2885
2886
  "file_search_call.results",
2886
2887
  "message.output_text.logprobs"
2887
2888
  ])
@@ -3131,7 +3132,11 @@ var OpenAIResponsesLanguageModel = class {
3131
3132
  const strictJsonSchema = (_b = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _b : false;
3132
3133
  let include = openaiOptions == null ? void 0 : openaiOptions.include;
3133
3134
  function addInclude(key) {
3134
- include = include != null ? [...include, key] : [key];
3135
+ if (include == null) {
3136
+ include = [key];
3137
+ } else if (!include.includes(key)) {
3138
+ include = [...include, key];
3139
+ }
3135
3140
  }
3136
3141
  function hasOpenAITool(id) {
3137
3142
  return (tools == null ? void 0 : tools.find(
@@ -3151,6 +3156,10 @@ var OpenAIResponsesLanguageModel = class {
3151
3156
  if (hasOpenAITool("openai.code_interpreter")) {
3152
3157
  addInclude("code_interpreter_call.outputs");
3153
3158
  }
3159
+ const store = openaiOptions == null ? void 0 : openaiOptions.store;
3160
+ if (store === false && modelConfig.isReasoningModel) {
3161
+ addInclude("reasoning.encrypted_content");
3162
+ }
3154
3163
  const baseArgs = {
3155
3164
  model: this.modelId,
3156
3165
  input,
@@ -3178,7 +3187,7 @@ var OpenAIResponsesLanguageModel = class {
3178
3187
  metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,
3179
3188
  parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,
3180
3189
  previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,
3181
- store: openaiOptions == null ? void 0 : openaiOptions.store,
3190
+ store,
3182
3191
  user: openaiOptions == null ? void 0 : openaiOptions.user,
3183
3192
  instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,
3184
3193
  service_tier: openaiOptions == null ? void 0 : openaiOptions.serviceTier,
@@ -4405,7 +4414,7 @@ var OpenAITranscriptionModel = class {
4405
4414
  };
4406
4415
 
4407
4416
  // src/version.ts
4408
- var VERSION = true ? "2.0.48" : "0.0.0-test";
4417
+ var VERSION = true ? "2.0.49" : "0.0.0-test";
4409
4418
 
4410
4419
  // src/openai-provider.ts
4411
4420
  function createOpenAI(options = {}) {