@ai-sdk/openai 2.0.115 → 2.0.116

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
+ ## 2.0.116
4
+
5
+ ### Patch Changes
6
+
7
+ - 8591016: Add blocked domain filters to the OpenAI and Azure Responses API web search tools.
8
+
3
9
  ## 2.0.115
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -113,8 +113,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
113
113
  * Allowed domains for the search.
114
114
  * If not provided, all domains are allowed.
115
115
  * Subdomains of the provided domains are allowed as well.
116
+ * Omit the HTTP or HTTPS prefix. Maximum 100 domains.
116
117
  */
117
118
  allowedDomains?: string[];
119
+ /**
120
+ * Blocked domains for the search.
121
+ * Subdomains of the provided domains are blocked as well.
122
+ * Omit the HTTP or HTTPS prefix. Maximum 100 domains.
123
+ */
124
+ blockedDomains?: string[];
118
125
  };
119
126
  /**
120
127
  * Search context size to use for the web search.
package/dist/index.d.ts CHANGED
@@ -113,8 +113,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFa
113
113
  * Allowed domains for the search.
114
114
  * If not provided, all domains are allowed.
115
115
  * Subdomains of the provided domains are allowed as well.
116
+ * Omit the HTTP or HTTPS prefix. Maximum 100 domains.
116
117
  */
117
118
  allowedDomains?: string[];
119
+ /**
120
+ * Blocked domains for the search.
121
+ * Subdomains of the provided domains are blocked as well.
122
+ * Omit the HTTP or HTTPS prefix. Maximum 100 domains.
123
+ */
124
+ blockedDomains?: string[];
118
125
  };
119
126
  /**
120
127
  * Search context size to use for the web search.
package/dist/index.js CHANGED
@@ -2138,7 +2138,10 @@ var webSearchArgsSchema = (0, import_provider_utils19.lazySchema)(
2138
2138
  () => (0, import_provider_utils19.zodSchema)(
2139
2139
  import_v414.z.object({
2140
2140
  externalWebAccess: import_v414.z.boolean().optional(),
2141
- filters: import_v414.z.object({ allowedDomains: import_v414.z.array(import_v414.z.string()).optional() }).optional(),
2141
+ filters: import_v414.z.object({
2142
+ allowedDomains: import_v414.z.array(import_v414.z.string()).optional(),
2143
+ blockedDomains: import_v414.z.array(import_v414.z.string()).optional()
2144
+ }).optional(),
2142
2145
  searchContextSize: import_v414.z.enum(["low", "medium", "high"]).optional(),
2143
2146
  userLocation: import_v414.z.object({
2144
2147
  type: import_v414.z.literal("approximate"),
@@ -3425,7 +3428,10 @@ async function prepareResponsesTools({
3425
3428
  });
3426
3429
  openaiTools2.push({
3427
3430
  type: "web_search",
3428
- filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
3431
+ filters: args.filters != null ? {
3432
+ allowed_domains: args.filters.allowedDomains,
3433
+ blocked_domains: args.filters.blockedDomains
3434
+ } : void 0,
3429
3435
  external_web_access: args.externalWebAccess,
3430
3436
  search_context_size: args.searchContextSize,
3431
3437
  user_location: args.userLocation
@@ -4996,7 +5002,7 @@ var OpenAITranscriptionModel = class {
4996
5002
  };
4997
5003
 
4998
5004
  // src/version.ts
4999
- var VERSION = true ? "2.0.115" : "0.0.0-test";
5005
+ var VERSION = true ? "2.0.116" : "0.0.0-test";
5000
5006
 
5001
5007
  // src/openai-provider.ts
5002
5008
  function createOpenAI(options = {}) {