@ai-sdk/openai 2.0.0-beta.6 → 2.0.0-beta.7

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.
@@ -2212,6 +2212,16 @@ function prepareResponsesTools({
2212
2212
  break;
2213
2213
  case "provider-defined":
2214
2214
  switch (tool.id) {
2215
+ case "openai.file_search": {
2216
+ const args = fileSearchArgsSchema.parse(tool.args);
2217
+ openaiTools.push({
2218
+ type: "file_search",
2219
+ vector_store_ids: args.vectorStoreIds,
2220
+ max_results: args.maxResults,
2221
+ search_type: args.searchType
2222
+ });
2223
+ break;
2224
+ }
2215
2225
  case "openai.web_search_preview":
2216
2226
  openaiTools.push({
2217
2227
  type: "web_search_preview",
@@ -2241,7 +2251,7 @@ function prepareResponsesTools({
2241
2251
  case "tool":
2242
2252
  return {
2243
2253
  tools: openaiTools,
2244
- toolChoice: toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
2254
+ toolChoice: toolChoice.toolName === "file_search" ? { type: "file_search" } : toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
2245
2255
  toolWarnings
2246
2256
  };
2247
2257
  default: {