@ai-sdk/openai 2.0.99 → 2.0.100

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.
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/internal/index.ts
21
- var internal_exports = {};
22
- __export(internal_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  OpenAIChatLanguageModel: () => OpenAIChatLanguageModel,
24
24
  OpenAICompletionLanguageModel: () => OpenAICompletionLanguageModel,
25
25
  OpenAIEmbeddingModel: () => OpenAIEmbeddingModel,
@@ -49,7 +49,7 @@ __export(internal_exports, {
49
49
  webSearchPreviewArgsSchema: () => webSearchPreviewArgsSchema,
50
50
  webSearchPreviewInputSchema: () => webSearchPreviewInputSchema
51
51
  });
52
- module.exports = __toCommonJS(internal_exports);
52
+ module.exports = __toCommonJS(index_exports);
53
53
 
54
54
  // src/chat/openai-chat-language-model.ts
55
55
  var import_provider3 = require("@ai-sdk/provider");
@@ -2215,7 +2215,7 @@ async function convertToOpenAIResponsesInput({
2215
2215
  hasLocalShellTool = false
2216
2216
  }) {
2217
2217
  var _a, _b, _c, _d, _e, _f;
2218
- const input = [];
2218
+ let input = [];
2219
2219
  const warnings = [];
2220
2220
  for (const { role, content } of prompt) {
2221
2221
  switch (role) {
@@ -2477,6 +2477,17 @@ async function convertToOpenAIResponsesInput({
2477
2477
  }
2478
2478
  }
2479
2479
  }
2480
+ if (!store && input.some(
2481
+ (item) => "type" in item && item.type === "reasoning" && item.encrypted_content == null
2482
+ )) {
2483
+ warnings.push({
2484
+ type: "other",
2485
+ message: "Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."
2486
+ });
2487
+ input = input.filter(
2488
+ (item) => !("type" in item) || item.type !== "reasoning" || item.encrypted_content != null
2489
+ );
2490
+ }
2480
2491
  return { input, warnings };
2481
2492
  }
2482
2493
  var openaiResponsesReasoningProviderOptionsSchema = import_v413.z.object({