@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [9ecdefe]
|
|
8
|
+
- @ai-sdk/provider-utils@4.0.41
|
|
9
|
+
|
|
10
|
+
## 3.0.89
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 23632b1: Add blocked domain filters to the OpenAI and Azure Responses API web search tools.
|
|
15
|
+
|
|
3
16
|
## 3.0.88
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -143,8 +143,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
143
143
|
* Allowed domains for the search.
|
|
144
144
|
* If not provided, all domains are allowed.
|
|
145
145
|
* Subdomains of the provided domains are allowed as well.
|
|
146
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
146
147
|
*/
|
|
147
148
|
allowedDomains?: string[];
|
|
149
|
+
/**
|
|
150
|
+
* Blocked domains for the search.
|
|
151
|
+
* Subdomains of the provided domains are blocked as well.
|
|
152
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
153
|
+
*/
|
|
154
|
+
blockedDomains?: string[];
|
|
148
155
|
};
|
|
149
156
|
/**
|
|
150
157
|
* Search context size to use for the web search.
|
package/dist/index.d.ts
CHANGED
|
@@ -143,8 +143,15 @@ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWi
|
|
|
143
143
|
* Allowed domains for the search.
|
|
144
144
|
* If not provided, all domains are allowed.
|
|
145
145
|
* Subdomains of the provided domains are allowed as well.
|
|
146
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
146
147
|
*/
|
|
147
148
|
allowedDomains?: string[];
|
|
149
|
+
/**
|
|
150
|
+
* Blocked domains for the search.
|
|
151
|
+
* Subdomains of the provided domains are blocked as well.
|
|
152
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
153
|
+
*/
|
|
154
|
+
blockedDomains?: string[];
|
|
148
155
|
};
|
|
149
156
|
/**
|
|
150
157
|
* Search context size to use for the web search.
|
package/dist/index.js
CHANGED
|
@@ -2651,7 +2651,10 @@ var webSearchArgsSchema = (0, import_provider_utils23.lazySchema)(
|
|
|
2651
2651
|
() => (0, import_provider_utils23.zodSchema)(
|
|
2652
2652
|
import_v418.z.object({
|
|
2653
2653
|
externalWebAccess: import_v418.z.boolean().optional(),
|
|
2654
|
-
filters: import_v418.z.object({
|
|
2654
|
+
filters: import_v418.z.object({
|
|
2655
|
+
allowedDomains: import_v418.z.array(import_v418.z.string()).optional(),
|
|
2656
|
+
blockedDomains: import_v418.z.array(import_v418.z.string()).optional()
|
|
2657
|
+
}).optional(),
|
|
2655
2658
|
searchContextSize: import_v418.z.enum(["low", "medium", "high"]).optional(),
|
|
2656
2659
|
userLocation: import_v418.z.object({
|
|
2657
2660
|
type: import_v418.z.literal("approximate"),
|
|
@@ -4984,7 +4987,10 @@ async function prepareResponsesTools({
|
|
|
4984
4987
|
});
|
|
4985
4988
|
openaiTools2.push({
|
|
4986
4989
|
type: "web_search",
|
|
4987
|
-
filters: args.filters != null ? {
|
|
4990
|
+
filters: args.filters != null ? {
|
|
4991
|
+
allowed_domains: args.filters.allowedDomains,
|
|
4992
|
+
blocked_domains: args.filters.blockedDomains
|
|
4993
|
+
} : void 0,
|
|
4988
4994
|
external_web_access: args.externalWebAccess,
|
|
4989
4995
|
search_context_size: args.searchContextSize,
|
|
4990
4996
|
user_location: args.userLocation
|
|
@@ -7347,7 +7353,7 @@ var OpenAITranscriptionModel = class {
|
|
|
7347
7353
|
};
|
|
7348
7354
|
|
|
7349
7355
|
// src/version.ts
|
|
7350
|
-
var VERSION = true ? "3.0.
|
|
7356
|
+
var VERSION = true ? "3.0.90" : "0.0.0-test";
|
|
7351
7357
|
|
|
7352
7358
|
// src/openai-provider.ts
|
|
7353
7359
|
function createOpenAI(options = {}) {
|