@ai-sdk/openai 4.0.22 → 4.0.23
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 +6 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +8 -0
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +5 -1
- package/package.json +1 -1
- 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
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -144,8 +144,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderExecutedToolF
|
|
|
144
144
|
* Allowed domains for the search.
|
|
145
145
|
* If not provided, all domains are allowed.
|
|
146
146
|
* Subdomains of the provided domains are allowed as well.
|
|
147
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
147
148
|
*/
|
|
148
149
|
allowedDomains?: string[];
|
|
150
|
+
/**
|
|
151
|
+
* Blocked domains for the search.
|
|
152
|
+
* Subdomains of the provided domains are blocked as well.
|
|
153
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
154
|
+
*/
|
|
155
|
+
blockedDomains?: string[];
|
|
149
156
|
};
|
|
150
157
|
/**
|
|
151
158
|
* Search context size to use for the web search.
|
package/dist/index.js
CHANGED
|
@@ -2942,7 +2942,10 @@ var webSearchArgsSchema = lazySchema20(
|
|
|
2942
2942
|
() => zodSchema20(
|
|
2943
2943
|
z21.object({
|
|
2944
2944
|
externalWebAccess: z21.boolean().optional(),
|
|
2945
|
-
filters: z21.object({
|
|
2945
|
+
filters: z21.object({
|
|
2946
|
+
allowedDomains: z21.array(z21.string()).optional(),
|
|
2947
|
+
blockedDomains: z21.array(z21.string()).optional()
|
|
2948
|
+
}).optional(),
|
|
2946
2949
|
searchContextSize: z21.enum(["low", "medium", "high"]).optional(),
|
|
2947
2950
|
userLocation: z21.object({
|
|
2948
2951
|
type: z21.literal("approximate"),
|
|
@@ -6065,7 +6068,10 @@ async function prepareResponsesTools({
|
|
|
6065
6068
|
});
|
|
6066
6069
|
openaiTools2.push({
|
|
6067
6070
|
type: "web_search",
|
|
6068
|
-
filters: args.filters != null ? {
|
|
6071
|
+
filters: args.filters != null ? {
|
|
6072
|
+
allowed_domains: args.filters.allowedDomains,
|
|
6073
|
+
blocked_domains: args.filters.blockedDomains
|
|
6074
|
+
} : void 0,
|
|
6069
6075
|
external_web_access: args.externalWebAccess,
|
|
6070
6076
|
search_context_size: args.searchContextSize,
|
|
6071
6077
|
user_location: args.userLocation
|
|
@@ -9416,7 +9422,7 @@ var OpenAISkills = class {
|
|
|
9416
9422
|
};
|
|
9417
9423
|
|
|
9418
9424
|
// src/version.ts
|
|
9419
|
-
var VERSION = true ? "4.0.
|
|
9425
|
+
var VERSION = true ? "4.0.23" : "0.0.0-test";
|
|
9420
9426
|
|
|
9421
9427
|
// src/openai-provider.ts
|
|
9422
9428
|
function createOpenAI(options = {}) {
|