@ai-sdk/openai 4.0.0-canary.65 → 4.0.0-canary.66

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 4.0.0-canary.66
4
+
5
+ ### Patch Changes
6
+
7
+ - e776fc7: feat(provider/azure):web search tool in the Azure OpenAI Responses API.
8
+
3
9
  ## 4.0.0-canary.65
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -7320,7 +7320,7 @@ var OpenAISkills = class {
7320
7320
  };
7321
7321
 
7322
7322
  // src/version.ts
7323
- var VERSION = true ? "4.0.0-canary.65" : "0.0.0-test";
7323
+ var VERSION = true ? "4.0.0-canary.66" : "0.0.0-test";
7324
7324
 
7325
7325
  // src/openai-provider.ts
7326
7326
  function createOpenAI(options = {}) {
@@ -1204,6 +1204,200 @@ declare const imageGeneration: (args?: ImageGenerationArgs) => _ai_sdk_provider_
1204
1204
  result: string;
1205
1205
  }, {}>;
1206
1206
 
1207
+ declare const webSearchArgsSchema: _ai_sdk_provider_utils.LazySchema<{
1208
+ externalWebAccess?: boolean | undefined;
1209
+ filters?: {
1210
+ allowedDomains?: string[] | undefined;
1211
+ } | undefined;
1212
+ searchContextSize?: "low" | "medium" | "high" | undefined;
1213
+ userLocation?: {
1214
+ type: "approximate";
1215
+ country?: string | undefined;
1216
+ city?: string | undefined;
1217
+ region?: string | undefined;
1218
+ timezone?: string | undefined;
1219
+ } | undefined;
1220
+ }>;
1221
+ declare const webSearchOutputSchema: _ai_sdk_provider_utils.LazySchema<{
1222
+ action?: {
1223
+ type: "search";
1224
+ query?: string | undefined;
1225
+ queries?: string[] | undefined;
1226
+ } | {
1227
+ type: "openPage";
1228
+ url?: string | null | undefined;
1229
+ } | {
1230
+ type: "findInPage";
1231
+ url?: string | null | undefined;
1232
+ pattern?: string | null | undefined;
1233
+ } | undefined;
1234
+ sources?: ({
1235
+ type: "url";
1236
+ url: string;
1237
+ } | {
1238
+ type: "api";
1239
+ name: string;
1240
+ })[] | undefined;
1241
+ }>;
1242
+ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
1243
+ /**
1244
+ * An object describing the specific action taken in this web search call.
1245
+ * Includes details on how the model used the web (search, open_page, find_in_page).
1246
+ */
1247
+ action?: {
1248
+ /**
1249
+ * Action type "search" - Performs a web search query.
1250
+ */
1251
+ type: "search";
1252
+ /**
1253
+ * The search query.
1254
+ *
1255
+ * @deprecated Use `queries` instead.
1256
+ */
1257
+ query?: string;
1258
+ /**
1259
+ * The search queries the model used.
1260
+ */
1261
+ queries?: string[];
1262
+ } | {
1263
+ /**
1264
+ * Action type "openPage" - Opens a specific URL from search results.
1265
+ */
1266
+ type: "openPage";
1267
+ /**
1268
+ * The URL opened by the model.
1269
+ */
1270
+ url?: string | null;
1271
+ } | {
1272
+ /**
1273
+ * Action type "findInPage": Searches for a pattern within a loaded page.
1274
+ */
1275
+ type: "findInPage";
1276
+ /**
1277
+ * The URL of the page searched for the pattern.
1278
+ */
1279
+ url?: string | null;
1280
+ /**
1281
+ * The pattern or text to search for within the page.
1282
+ */
1283
+ pattern?: string | null;
1284
+ };
1285
+ /**
1286
+ * Optional sources cited by the model for the web search call.
1287
+ */
1288
+ sources?: Array<{
1289
+ type: "url";
1290
+ url: string;
1291
+ } | {
1292
+ type: "api";
1293
+ name: string;
1294
+ }>;
1295
+ }, {
1296
+ /**
1297
+ * Whether to use external web access for fetching live content.
1298
+ * - true: Fetch live web content (default)
1299
+ * - false: Use cached/indexed results
1300
+ */
1301
+ externalWebAccess?: boolean;
1302
+ /**
1303
+ * Filters for the search.
1304
+ */
1305
+ filters?: {
1306
+ /**
1307
+ * Allowed domains for the search.
1308
+ * If not provided, all domains are allowed.
1309
+ * Subdomains of the provided domains are allowed as well.
1310
+ */
1311
+ allowedDomains?: string[];
1312
+ };
1313
+ /**
1314
+ * Search context size to use for the web search.
1315
+ * - high: Most comprehensive context, highest cost, slower response
1316
+ * - medium: Balanced context, cost, and latency (default)
1317
+ * - low: Least context, lowest cost, fastest response
1318
+ */
1319
+ searchContextSize?: "low" | "medium" | "high";
1320
+ /**
1321
+ * User location information to provide geographically relevant search results.
1322
+ */
1323
+ userLocation?: {
1324
+ /**
1325
+ * Type of location (always 'approximate')
1326
+ */
1327
+ type: "approximate";
1328
+ /**
1329
+ * Two-letter ISO country code (e.g., 'US', 'GB')
1330
+ */
1331
+ country?: string;
1332
+ /**
1333
+ * City name (free text, e.g., 'Minneapolis')
1334
+ */
1335
+ city?: string;
1336
+ /**
1337
+ * Region name (free text, e.g., 'Minnesota')
1338
+ */
1339
+ region?: string;
1340
+ /**
1341
+ * IANA timezone (e.g., 'America/Chicago')
1342
+ */
1343
+ timezone?: string;
1344
+ };
1345
+ }, {}>;
1346
+ declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
1347
+ /**
1348
+ * An object describing the specific action taken in this web search call.
1349
+ * Includes details on how the model used the web (search, open_page, find_in_page).
1350
+ */
1351
+ action?: {
1352
+ /**
1353
+ * Action type "search" - Performs a web search query.
1354
+ */
1355
+ type: "search";
1356
+ /**
1357
+ * The search query.
1358
+ *
1359
+ * @deprecated Use `queries` instead.
1360
+ */
1361
+ query?: string;
1362
+ /**
1363
+ * The search queries the model used.
1364
+ */
1365
+ queries?: string[];
1366
+ } | {
1367
+ /**
1368
+ * Action type "openPage" - Opens a specific URL from search results.
1369
+ */
1370
+ type: "openPage";
1371
+ /**
1372
+ * The URL opened by the model.
1373
+ */
1374
+ url?: string | null;
1375
+ } | {
1376
+ /**
1377
+ * Action type "findInPage": Searches for a pattern within a loaded page.
1378
+ */
1379
+ type: "findInPage";
1380
+ /**
1381
+ * The URL of the page searched for the pattern.
1382
+ */
1383
+ url?: string | null;
1384
+ /**
1385
+ * The pattern or text to search for within the page.
1386
+ */
1387
+ pattern?: string | null;
1388
+ };
1389
+ /**
1390
+ * Optional sources cited by the model for the web search call.
1391
+ */
1392
+ sources?: Array<{
1393
+ type: "url";
1394
+ url: string;
1395
+ } | {
1396
+ type: "api";
1397
+ name: string;
1398
+ }>;
1399
+ }, {}>;
1400
+
1207
1401
  declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
1208
1402
  searchContextSize?: "low" | "medium" | "high" | undefined;
1209
1403
  userLocation?: {
@@ -1287,4 +1481,4 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderExecutedToolFacto
1287
1481
  };
1288
1482
  }, {}>;
1289
1483
 
1290
- export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesCompactionProviderMetadata, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesCompactionProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema };
1484
+ export { type ApplyPatchOperation, OpenAIChatLanguageModel, type OpenAIChatModelId, OpenAICompletionLanguageModel, type OpenAICompletionModelId, OpenAIEmbeddingModel, type OpenAIEmbeddingModelId, type OpenAIEmbeddingModelOptions, OpenAIImageModel, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelId, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, OpenAIResponsesLanguageModel, OpenAISpeechModel, type OpenAISpeechModelId, type OpenAISpeechModelOptions, type OpenAITranscriptionCallOptions, OpenAITranscriptionModel, type OpenAITranscriptionModelId, type OpenAITranscriptionModelOptions, type OpenaiResponsesCompactionProviderMetadata, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type ResponsesCompactionProviderMetadata, type ResponsesProviderMetadata, type ResponsesReasoningProviderMetadata, type ResponsesSourceDocumentProviderMetadata, type ResponsesTextProviderMetadata, applyPatch, applyPatchArgsSchema, applyPatchInputSchema, applyPatchOutputSchema, applyPatchToolFactory, codeInterpreter, codeInterpreterArgsSchema, codeInterpreterInputSchema, codeInterpreterOutputSchema, codeInterpreterToolFactory, fileSearch, fileSearchArgsSchema, fileSearchOutputSchema, hasDefaultResponseFormat, imageGeneration, imageGenerationArgsSchema, imageGenerationOutputSchema, modelMaxImagesPerCall, openAITranscriptionModelOptions, openaiEmbeddingModelOptions, openaiImageModelEditOptions, openaiImageModelGenerationOptions, openaiImageModelOptions, openaiLanguageModelChatOptions, openaiLanguageModelCompletionOptions, openaiSpeechModelOptionsSchema, webSearch, webSearchArgsSchema, webSearchOutputSchema, webSearchPreview, webSearchPreviewArgsSchema, webSearchPreviewInputSchema, webSearchToolFactory };
@@ -4900,6 +4900,7 @@ var webSearchToolFactory = createProviderExecutedToolFactory5({
4900
4900
  inputSchema: webSearchInputSchema,
4901
4901
  outputSchema: webSearchOutputSchema
4902
4902
  });
4903
+ var webSearch = (args = {}) => webSearchToolFactory(args);
4903
4904
 
4904
4905
  // src/tool/web-search-preview.ts
4905
4906
  import {
@@ -7032,8 +7033,12 @@ export {
7032
7033
  openaiLanguageModelChatOptions,
7033
7034
  openaiLanguageModelCompletionOptions,
7034
7035
  openaiSpeechModelOptionsSchema,
7036
+ webSearch,
7037
+ webSearchArgsSchema,
7038
+ webSearchOutputSchema,
7035
7039
  webSearchPreview,
7036
7040
  webSearchPreviewArgsSchema,
7037
- webSearchPreviewInputSchema
7041
+ webSearchPreviewInputSchema,
7042
+ webSearchToolFactory
7038
7043
  };
7039
7044
  //# sourceMappingURL=index.js.map