@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.
package/dist/index.mjs CHANGED
@@ -2132,6 +2132,16 @@ function prepareResponsesTools({
2132
2132
  break;
2133
2133
  case "provider-defined":
2134
2134
  switch (tool.id) {
2135
+ case "openai.file_search": {
2136
+ const args = fileSearchArgsSchema.parse(tool.args);
2137
+ openaiTools2.push({
2138
+ type: "file_search",
2139
+ vector_store_ids: args.vectorStoreIds,
2140
+ max_results: args.maxResults,
2141
+ search_type: args.searchType
2142
+ });
2143
+ break;
2144
+ }
2135
2145
  case "openai.web_search_preview":
2136
2146
  openaiTools2.push({
2137
2147
  type: "web_search_preview",
@@ -2161,7 +2171,7 @@ function prepareResponsesTools({
2161
2171
  case "tool":
2162
2172
  return {
2163
2173
  tools: openaiTools2,
2164
- toolChoice: toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
2174
+ toolChoice: toolChoice.toolName === "file_search" ? { type: "file_search" } : toolChoice.toolName === "web_search_preview" ? { type: "web_search_preview" } : { type: "function", name: toolChoice.toolName },
2165
2175
  toolWarnings
2166
2176
  };
2167
2177
  default: {