@ai-sdk/openai 3.0.0-beta.36 → 3.0.0-beta.37
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 +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.js
CHANGED
|
@@ -2618,7 +2618,8 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazySchema)(
|
|
|
2618
2618
|
action: import_v414.z.discriminatedUnion("type", [
|
|
2619
2619
|
import_v414.z.object({
|
|
2620
2620
|
type: import_v414.z.literal("search"),
|
|
2621
|
-
query: import_v414.z.string().nullish()
|
|
2621
|
+
query: import_v414.z.string().nullish(),
|
|
2622
|
+
sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
|
|
2622
2623
|
}),
|
|
2623
2624
|
import_v414.z.object({
|
|
2624
2625
|
type: import_v414.z.literal("open_page"),
|
|
@@ -2804,7 +2805,8 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazySchema)(
|
|
|
2804
2805
|
action: import_v414.z.discriminatedUnion("type", [
|
|
2805
2806
|
import_v414.z.object({
|
|
2806
2807
|
type: import_v414.z.literal("search"),
|
|
2807
|
-
query: import_v414.z.string().nullish()
|
|
2808
|
+
query: import_v414.z.string().nullish(),
|
|
2809
|
+
sources: import_v414.z.array(import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() })).nullish()
|
|
2808
2810
|
}),
|
|
2809
2811
|
import_v414.z.object({
|
|
2810
2812
|
type: import_v414.z.literal("open_page"),
|
|
@@ -3141,7 +3143,8 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
|
|
|
3141
3143
|
url: import_v418.z.string(),
|
|
3142
3144
|
pattern: import_v418.z.string()
|
|
3143
3145
|
})
|
|
3144
|
-
])
|
|
3146
|
+
]),
|
|
3147
|
+
sources: import_v418.z.array(import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() })).optional()
|
|
3145
3148
|
})
|
|
3146
3149
|
)
|
|
3147
3150
|
);
|
|
@@ -4407,7 +4410,11 @@ function mapWebSearchOutput(action) {
|
|
|
4407
4410
|
var _a;
|
|
4408
4411
|
switch (action.type) {
|
|
4409
4412
|
case "search":
|
|
4410
|
-
return {
|
|
4413
|
+
return {
|
|
4414
|
+
action: { type: "search", query: (_a = action.query) != null ? _a : void 0 },
|
|
4415
|
+
// include sources when provided by the Responses API (behind include flag)
|
|
4416
|
+
...action.sources != null && { sources: action.sources }
|
|
4417
|
+
};
|
|
4411
4418
|
case "open_page":
|
|
4412
4419
|
return { action: { type: "openPage", url: action.url } };
|
|
4413
4420
|
case "find":
|