@ai-sdk/openai 2.0.36 → 2.0.38

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.
@@ -2175,26 +2175,40 @@ async function convertToOpenAIResponsesInput({
2175
2175
  });
2176
2176
  const reasoningId = providerOptions == null ? void 0 : providerOptions.itemId;
2177
2177
  if (reasoningId != null) {
2178
- const existingReasoningMessage = reasoningMessages[reasoningId];
2179
- const summaryParts = [];
2180
- if (part.text.length > 0) {
2181
- summaryParts.push({ type: "summary_text", text: part.text });
2182
- } else if (existingReasoningMessage !== void 0) {
2183
- warnings.push({
2184
- type: "other",
2185
- message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(part)}.`
2186
- });
2187
- }
2188
- if (existingReasoningMessage === void 0) {
2189
- reasoningMessages[reasoningId] = {
2190
- type: "reasoning",
2191
- id: reasoningId,
2192
- encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
2193
- summary: summaryParts
2194
- };
2195
- input.push(reasoningMessages[reasoningId]);
2178
+ const reasoningMessage = reasoningMessages[reasoningId];
2179
+ if (store) {
2180
+ if (reasoningMessage === void 0) {
2181
+ input.push({ type: "item_reference", id: reasoningId });
2182
+ reasoningMessages[reasoningId] = {
2183
+ type: "reasoning",
2184
+ id: reasoningId,
2185
+ summary: []
2186
+ };
2187
+ }
2196
2188
  } else {
2197
- existingReasoningMessage.summary.push(...summaryParts);
2189
+ const summaryParts = [];
2190
+ if (part.text.length > 0) {
2191
+ summaryParts.push({
2192
+ type: "summary_text",
2193
+ text: part.text
2194
+ });
2195
+ } else if (reasoningMessage !== void 0) {
2196
+ warnings.push({
2197
+ type: "other",
2198
+ message: `Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(part)}.`
2199
+ });
2200
+ }
2201
+ if (reasoningMessage === void 0) {
2202
+ reasoningMessages[reasoningId] = {
2203
+ type: "reasoning",
2204
+ id: reasoningId,
2205
+ encrypted_content: providerOptions == null ? void 0 : providerOptions.reasoningEncryptedContent,
2206
+ summary: summaryParts
2207
+ };
2208
+ input.push(reasoningMessages[reasoningId]);
2209
+ } else {
2210
+ reasoningMessage.summary.push(...summaryParts);
2211
+ }
2198
2212
  }
2199
2213
  } else {
2200
2214
  warnings.push({
@@ -2296,6 +2310,9 @@ var codeInterpreterToolFactory = createProviderDefinedToolFactoryWithOutputSchem
2296
2310
  inputSchema: codeInterpreterInputSchema,
2297
2311
  outputSchema: codeInterpreterOutputSchema
2298
2312
  });
2313
+ var codeInterpreter = (args = {}) => {
2314
+ return codeInterpreterToolFactory(args);
2315
+ };
2299
2316
 
2300
2317
  // src/tool/file-search.ts
2301
2318
  import { createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2 } from "@ai-sdk/provider-utils";
@@ -3832,6 +3849,14 @@ export {
3832
3849
  OpenAIResponsesLanguageModel,
3833
3850
  OpenAISpeechModel,
3834
3851
  OpenAITranscriptionModel,
3852
+ codeInterpreter,
3853
+ codeInterpreterArgsSchema,
3854
+ codeInterpreterInputSchema,
3855
+ codeInterpreterOutputSchema,
3856
+ codeInterpreterToolFactory,
3857
+ fileSearch,
3858
+ fileSearchArgsSchema,
3859
+ fileSearchOutputSchema,
3835
3860
  hasDefaultResponseFormat,
3836
3861
  modelMaxImagesPerCall,
3837
3862
  openAITranscriptionProviderOptions,