@ai-sdk/openai 2.0.70 → 2.0.72
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 +12 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +84 -1
- package/dist/internal/index.d.ts +84 -1
- package/dist/internal/index.js +14 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -2722,6 +2722,8 @@ var openaiResponsesChunkSchema = lazyValidator11(
|
|
|
2722
2722
|
annotation: z14.discriminatedUnion("type", [
|
|
2723
2723
|
z14.object({
|
|
2724
2724
|
type: z14.literal("url_citation"),
|
|
2725
|
+
start_index: z14.number(),
|
|
2726
|
+
end_index: z14.number(),
|
|
2725
2727
|
url: z14.string(),
|
|
2726
2728
|
title: z14.string()
|
|
2727
2729
|
}),
|
|
@@ -3199,6 +3201,7 @@ import { z as z18 } from "zod/v4";
|
|
|
3199
3201
|
var webSearchArgsSchema = lazySchema4(
|
|
3200
3202
|
() => zodSchema16(
|
|
3201
3203
|
z18.object({
|
|
3204
|
+
externalWebAccess: z18.boolean().optional(),
|
|
3202
3205
|
filters: z18.object({ allowedDomains: z18.array(z18.string()).optional() }).optional(),
|
|
3203
3206
|
searchContextSize: z18.enum(["low", "medium", "high"]).optional(),
|
|
3204
3207
|
userLocation: z18.object({
|
|
@@ -3407,6 +3410,7 @@ async function prepareResponsesTools({
|
|
|
3407
3410
|
openaiTools.push({
|
|
3408
3411
|
type: "web_search",
|
|
3409
3412
|
filters: args.filters != null ? { allowed_domains: args.filters.allowedDomains } : void 0,
|
|
3413
|
+
external_web_access: args.externalWebAccess,
|
|
3410
3414
|
search_context_size: args.searchContextSize,
|
|
3411
3415
|
user_location: args.userLocation
|
|
3412
3416
|
});
|
|
@@ -4062,7 +4066,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4062
4066
|
controller.enqueue({
|
|
4063
4067
|
type: "tool-call",
|
|
4064
4068
|
toolCallId: value.item.id,
|
|
4065
|
-
toolName: "web_search",
|
|
4069
|
+
toolName: webSearchToolName != null ? webSearchToolName : "web_search",
|
|
4066
4070
|
input: JSON.stringify({}),
|
|
4067
4071
|
providerExecuted: true
|
|
4068
4072
|
});
|
|
@@ -4163,7 +4167,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
4163
4167
|
controller.enqueue({
|
|
4164
4168
|
type: "tool-result",
|
|
4165
4169
|
toolCallId: value.item.id,
|
|
4166
|
-
toolName: "web_search",
|
|
4170
|
+
toolName: webSearchToolName != null ? webSearchToolName : "web_search",
|
|
4167
4171
|
result: mapWebSearchOutput(value.item.action),
|
|
4168
4172
|
providerExecuted: true
|
|
4169
4173
|
});
|
|
@@ -4562,6 +4566,9 @@ export {
|
|
|
4562
4566
|
openaiChatLanguageModelOptions,
|
|
4563
4567
|
openaiCompletionProviderOptions,
|
|
4564
4568
|
openaiEmbeddingProviderOptions,
|
|
4565
|
-
openaiSpeechProviderOptionsSchema
|
|
4569
|
+
openaiSpeechProviderOptionsSchema,
|
|
4570
|
+
webSearchPreview,
|
|
4571
|
+
webSearchPreviewArgsSchema,
|
|
4572
|
+
webSearchPreviewInputSchema
|
|
4566
4573
|
};
|
|
4567
4574
|
//# sourceMappingURL=index.mjs.map
|