@ai-sdk/openai 3.0.88 → 3.0.90
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 +13 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +8 -0
- package/dist/internal/index.d.ts +8 -0
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -2
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +5 -1
- package/package.json +2 -2
- package/src/responses/openai-responses-api.ts +6 -1
- package/src/responses/openai-responses-prepare-tools.ts +4 -1
- package/src/tool/web-search.ts +12 -1
|
@@ -1162,6 +1162,7 @@ declare const webSearchArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
1162
1162
|
externalWebAccess?: boolean | undefined;
|
|
1163
1163
|
filters?: {
|
|
1164
1164
|
allowedDomains?: string[] | undefined;
|
|
1165
|
+
blockedDomains?: string[] | undefined;
|
|
1165
1166
|
} | undefined;
|
|
1166
1167
|
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1167
1168
|
userLocation?: {
|
|
@@ -1261,8 +1262,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
1261
1262
|
* Allowed domains for the search.
|
|
1262
1263
|
* If not provided, all domains are allowed.
|
|
1263
1264
|
* Subdomains of the provided domains are allowed as well.
|
|
1265
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1264
1266
|
*/
|
|
1265
1267
|
allowedDomains?: string[];
|
|
1268
|
+
/**
|
|
1269
|
+
* Blocked domains for the search.
|
|
1270
|
+
* Subdomains of the provided domains are blocked as well.
|
|
1271
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1272
|
+
*/
|
|
1273
|
+
blockedDomains?: string[];
|
|
1266
1274
|
};
|
|
1267
1275
|
/**
|
|
1268
1276
|
* Search context size to use for the web search.
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1162,6 +1162,7 @@ declare const webSearchArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
1162
1162
|
externalWebAccess?: boolean | undefined;
|
|
1163
1163
|
filters?: {
|
|
1164
1164
|
allowedDomains?: string[] | undefined;
|
|
1165
|
+
blockedDomains?: string[] | undefined;
|
|
1165
1166
|
} | undefined;
|
|
1166
1167
|
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1167
1168
|
userLocation?: {
|
|
@@ -1261,8 +1262,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
1261
1262
|
* Allowed domains for the search.
|
|
1262
1263
|
* If not provided, all domains are allowed.
|
|
1263
1264
|
* Subdomains of the provided domains are allowed as well.
|
|
1265
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1264
1266
|
*/
|
|
1265
1267
|
allowedDomains?: string[];
|
|
1268
|
+
/**
|
|
1269
|
+
* Blocked domains for the search.
|
|
1270
|
+
* Subdomains of the provided domains are blocked as well.
|
|
1271
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1272
|
+
*/
|
|
1273
|
+
blockedDomains?: string[];
|
|
1266
1274
|
};
|
|
1267
1275
|
/**
|
|
1268
1276
|
* Search context size to use for the web search.
|
package/dist/internal/index.js
CHANGED
|
@@ -5048,7 +5048,10 @@ var webSearchArgsSchema = (0, import_provider_utils32.lazySchema)(
|
|
|
5048
5048
|
() => (0, import_provider_utils32.zodSchema)(
|
|
5049
5049
|
import_v425.z.object({
|
|
5050
5050
|
externalWebAccess: import_v425.z.boolean().optional(),
|
|
5051
|
-
filters: import_v425.z.object({
|
|
5051
|
+
filters: import_v425.z.object({
|
|
5052
|
+
allowedDomains: import_v425.z.array(import_v425.z.string()).optional(),
|
|
5053
|
+
blockedDomains: import_v425.z.array(import_v425.z.string()).optional()
|
|
5054
|
+
}).optional(),
|
|
5052
5055
|
searchContextSize: import_v425.z.enum(["low", "medium", "high"]).optional(),
|
|
5053
5056
|
userLocation: import_v425.z.object({
|
|
5054
5057
|
type: import_v425.z.literal("approximate"),
|
|
@@ -5254,7 +5257,10 @@ async function prepareResponsesTools({
|
|
|
5254
5257
|
});
|
|
5255
5258
|
openaiTools.push({
|
|
5256
5259
|
type: "web_search",
|
|
5257
|
-
filters: args.filters != null ? {
|
|
5260
|
+
filters: args.filters != null ? {
|
|
5261
|
+
allowed_domains: args.filters.allowedDomains,
|
|
5262
|
+
blocked_domains: args.filters.blockedDomains
|
|
5263
|
+
} : void 0,
|
|
5258
5264
|
external_web_access: args.externalWebAccess,
|
|
5259
5265
|
search_context_size: args.searchContextSize,
|
|
5260
5266
|
user_location: args.userLocation
|