@ai-sdk/openai 3.0.0-beta.72 → 3.0.0-beta.73

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.
@@ -229,7 +229,7 @@ type CodeInterpreterArgs = {
229
229
  fileIds?: string[];
230
230
  };
231
231
  };
232
- declare const codeInterpreterToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
232
+ declare const codeInterpreterToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
233
233
  /**
234
234
  * The code to run, or null if not available.
235
235
  */
@@ -336,7 +336,7 @@ declare const fileSearchOutputSchema: _ai_sdk_provider_utils.LazySchema<{
336
336
  text: string;
337
337
  }[] | null;
338
338
  }>;
339
- declare const fileSearch: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
339
+ declare const fileSearch: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
340
340
  /**
341
341
  * The search query to execute.
342
342
  */
@@ -492,7 +492,7 @@ declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
492
492
  } | undefined;
493
493
  }>;
494
494
  declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Record<string, never>>;
495
- declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
495
+ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
496
496
  /**
497
497
  * An object describing the specific action taken in this web search call.
498
498
  * Includes details on how the model used the web (search, open_page, find).
@@ -229,7 +229,7 @@ type CodeInterpreterArgs = {
229
229
  fileIds?: string[];
230
230
  };
231
231
  };
232
- declare const codeInterpreterToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
232
+ declare const codeInterpreterToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
233
233
  /**
234
234
  * The code to run, or null if not available.
235
235
  */
@@ -336,7 +336,7 @@ declare const fileSearchOutputSchema: _ai_sdk_provider_utils.LazySchema<{
336
336
  text: string;
337
337
  }[] | null;
338
338
  }>;
339
- declare const fileSearch: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
339
+ declare const fileSearch: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
340
340
  /**
341
341
  * The search query to execute.
342
342
  */
@@ -492,7 +492,7 @@ declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
492
492
  } | undefined;
493
493
  }>;
494
494
  declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Record<string, never>>;
495
- declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
495
+ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
496
496
  /**
497
497
  * An object describing the specific action taken in this web search call.
498
498
  * Includes details on how the model used the web (search, open_page, find).
@@ -2156,7 +2156,7 @@ var localShellInputSchema = (0, import_provider_utils19.lazySchema)(
2156
2156
  var localShellOutputSchema = (0, import_provider_utils19.lazySchema)(
2157
2157
  () => (0, import_provider_utils19.zodSchema)(import_v412.z.object({ output: import_v412.z.string() }))
2158
2158
  );
2159
- var localShell = (0, import_provider_utils19.createProviderDefinedToolFactoryWithOutputSchema)({
2159
+ var localShell = (0, import_provider_utils19.createProviderToolFactoryWithOutputSchema)({
2160
2160
  id: "openai.local_shell",
2161
2161
  inputSchema: localShellInputSchema,
2162
2162
  outputSchema: localShellOutputSchema
@@ -3223,7 +3223,7 @@ var codeInterpreterArgsSchema = (0, import_provider_utils23.lazySchema)(
3223
3223
  })
3224
3224
  )
3225
3225
  );
3226
- var codeInterpreterToolFactory = (0, import_provider_utils23.createProviderDefinedToolFactoryWithOutputSchema)({
3226
+ var codeInterpreterToolFactory = (0, import_provider_utils23.createProviderToolFactoryWithOutputSchema)({
3227
3227
  id: "openai.code_interpreter",
3228
3228
  inputSchema: codeInterpreterInputSchema,
3229
3229
  outputSchema: codeInterpreterOutputSchema
@@ -3275,7 +3275,7 @@ var fileSearchOutputSchema = (0, import_provider_utils24.lazySchema)(
3275
3275
  })
3276
3276
  )
3277
3277
  );
3278
- var fileSearch = (0, import_provider_utils24.createProviderDefinedToolFactoryWithOutputSchema)({
3278
+ var fileSearch = (0, import_provider_utils24.createProviderToolFactoryWithOutputSchema)({
3279
3279
  id: "openai.file_search",
3280
3280
  inputSchema: import_v417.z.object({}),
3281
3281
  outputSchema: fileSearchOutputSchema
@@ -3307,7 +3307,7 @@ var imageGenerationInputSchema = (0, import_provider_utils25.lazySchema)(() => (
3307
3307
  var imageGenerationOutputSchema = (0, import_provider_utils25.lazySchema)(
3308
3308
  () => (0, import_provider_utils25.zodSchema)(import_v418.z.object({ result: import_v418.z.string() }))
3309
3309
  );
3310
- var imageGenerationToolFactory = (0, import_provider_utils25.createProviderDefinedToolFactoryWithOutputSchema)({
3310
+ var imageGenerationToolFactory = (0, import_provider_utils25.createProviderToolFactoryWithOutputSchema)({
3311
3311
  id: "openai.image_generation",
3312
3312
  inputSchema: imageGenerationInputSchema,
3313
3313
  outputSchema: imageGenerationOutputSchema
@@ -3396,7 +3396,7 @@ var mcpOutputSchema = (0, import_provider_utils26.lazySchema)(
3396
3396
  ])
3397
3397
  )
3398
3398
  );
3399
- var mcpToolFactory = (0, import_provider_utils26.createProviderDefinedToolFactoryWithOutputSchema)({
3399
+ var mcpToolFactory = (0, import_provider_utils26.createProviderToolFactoryWithOutputSchema)({
3400
3400
  id: "openai.mcp",
3401
3401
  inputSchema: mcpInputSchema,
3402
3402
  outputSchema: mcpOutputSchema
@@ -3449,7 +3449,7 @@ var webSearchOutputSchema = (0, import_provider_utils27.lazySchema)(
3449
3449
  })
3450
3450
  )
3451
3451
  );
3452
- var webSearchToolFactory = (0, import_provider_utils27.createProviderDefinedToolFactoryWithOutputSchema)({
3452
+ var webSearchToolFactory = (0, import_provider_utils27.createProviderToolFactoryWithOutputSchema)({
3453
3453
  id: "openai.web_search",
3454
3454
  inputSchema: webSearchInputSchema,
3455
3455
  outputSchema: webSearchOutputSchema
@@ -3496,7 +3496,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils28.lazySchema)(
3496
3496
  })
3497
3497
  )
3498
3498
  );
3499
- var webSearchPreview = (0, import_provider_utils28.createProviderDefinedToolFactoryWithOutputSchema)({
3499
+ var webSearchPreview = (0, import_provider_utils28.createProviderToolFactoryWithOutputSchema)({
3500
3500
  id: "openai.web_search_preview",
3501
3501
  inputSchema: webSearchPreviewInputSchema,
3502
3502
  outputSchema: webSearchPreviewOutputSchema
@@ -3525,7 +3525,7 @@ async function prepareResponsesTools({
3525
3525
  strict: strictJsonSchema
3526
3526
  });
3527
3527
  break;
3528
- case "provider-defined": {
3528
+ case "provider": {
3529
3529
  switch (tool.id) {
3530
3530
  case "openai.file_search": {
3531
3531
  const args = await (0, import_provider_utils29.validateTypes)({
@@ -3756,16 +3756,14 @@ var OpenAIResponsesLanguageModel = class {
3756
3756
  }
3757
3757
  }
3758
3758
  function hasOpenAITool(id) {
3759
- return (tools == null ? void 0 : tools.find(
3760
- (tool) => tool.type === "provider-defined" && tool.id === id
3761
- )) != null;
3759
+ return (tools == null ? void 0 : tools.find((tool) => tool.type === "provider" && tool.id === id)) != null;
3762
3760
  }
3763
3761
  const topLogprobs = typeof (openaiOptions == null ? void 0 : openaiOptions.logprobs) === "number" ? openaiOptions == null ? void 0 : openaiOptions.logprobs : (openaiOptions == null ? void 0 : openaiOptions.logprobs) === true ? TOP_LOGPROBS_MAX : void 0;
3764
3762
  if (topLogprobs) {
3765
3763
  addInclude("message.output_text.logprobs");
3766
3764
  }
3767
3765
  const webSearchToolName = (_c = tools == null ? void 0 : tools.find(
3768
- (tool) => tool.type === "provider-defined" && (tool.id === "openai.web_search" || tool.id === "openai.web_search_preview")
3766
+ (tool) => tool.type === "provider" && (tool.id === "openai.web_search" || tool.id === "openai.web_search_preview")
3769
3767
  )) == null ? void 0 : _c.name;
3770
3768
  if (webSearchToolName) {
3771
3769
  addInclude("web_search_call.action.sources");