@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 +6 -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 +190 -1
- package/dist/internal/index.d.ts +190 -1
- package/dist/internal/index.js +19 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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({
|
|
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 ? {
|
|
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.
|
|
5005
|
+
var VERSION = true ? "2.0.116" : "0.0.0-test";
|
|
5000
5006
|
|
|
5001
5007
|
// src/openai-provider.ts
|
|
5002
5008
|
function createOpenAI(options = {}) {
|