@ai-sdk/openai 2.0.92 → 2.0.93
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +11 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -493,7 +493,7 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
493
493
|
* An object describing the specific action taken in this web search call.
|
|
494
494
|
* Includes details on how the model used the web (search, open_page, findInPage).
|
|
495
495
|
*/
|
|
496
|
-
action
|
|
496
|
+
action?: {
|
|
497
497
|
/**
|
|
498
498
|
* Action type "search" - Performs a web search query.
|
|
499
499
|
*/
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -493,7 +493,7 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactor
|
|
|
493
493
|
* An object describing the specific action taken in this web search call.
|
|
494
494
|
* Includes details on how the model used the web (search, open_page, findInPage).
|
|
495
495
|
*/
|
|
496
|
-
action
|
|
496
|
+
action?: {
|
|
497
497
|
/**
|
|
498
498
|
* Action type "search" - Performs a web search query.
|
|
499
499
|
*/
|
package/dist/internal/index.js
CHANGED
|
@@ -2660,7 +2660,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2660
2660
|
url: import_v414.z.string().nullish(),
|
|
2661
2661
|
pattern: import_v414.z.string().nullish()
|
|
2662
2662
|
})
|
|
2663
|
-
])
|
|
2663
|
+
]).nullish()
|
|
2664
2664
|
}),
|
|
2665
2665
|
import_v414.z.object({
|
|
2666
2666
|
type: import_v414.z.literal("file_search_call"),
|
|
@@ -2857,7 +2857,10 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2857
2857
|
sources: import_v414.z.array(
|
|
2858
2858
|
import_v414.z.discriminatedUnion("type", [
|
|
2859
2859
|
import_v414.z.object({ type: import_v414.z.literal("url"), url: import_v414.z.string() }),
|
|
2860
|
-
import_v414.z.object({
|
|
2860
|
+
import_v414.z.object({
|
|
2861
|
+
type: import_v414.z.literal("api"),
|
|
2862
|
+
name: import_v414.z.string()
|
|
2863
|
+
})
|
|
2861
2864
|
])
|
|
2862
2865
|
).nullish()
|
|
2863
2866
|
}),
|
|
@@ -2870,7 +2873,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2870
2873
|
url: import_v414.z.string().nullish(),
|
|
2871
2874
|
pattern: import_v414.z.string().nullish()
|
|
2872
2875
|
})
|
|
2873
|
-
])
|
|
2876
|
+
]).nullish()
|
|
2874
2877
|
}),
|
|
2875
2878
|
import_v414.z.object({
|
|
2876
2879
|
type: import_v414.z.literal("file_search_call"),
|
|
@@ -3232,7 +3235,7 @@ var webSearchOutputSchema = (0, import_provider_utils25.lazySchema)(
|
|
|
3232
3235
|
url: import_v418.z.string().nullish(),
|
|
3233
3236
|
pattern: import_v418.z.string().nullish()
|
|
3234
3237
|
})
|
|
3235
|
-
]),
|
|
3238
|
+
]).optional(),
|
|
3236
3239
|
sources: import_v418.z.array(
|
|
3237
3240
|
import_v418.z.discriminatedUnion("type", [
|
|
3238
3241
|
import_v418.z.object({ type: import_v418.z.literal("url"), url: import_v418.z.string() }),
|
|
@@ -3286,7 +3289,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils26.lazySchema)(
|
|
|
3286
3289
|
url: import_v419.z.string().nullish(),
|
|
3287
3290
|
pattern: import_v419.z.string().nullish()
|
|
3288
3291
|
})
|
|
3289
|
-
])
|
|
3292
|
+
]).optional()
|
|
3290
3293
|
})
|
|
3291
3294
|
)
|
|
3292
3295
|
);
|
|
@@ -4529,6 +4532,9 @@ function isErrorChunk(chunk) {
|
|
|
4529
4532
|
}
|
|
4530
4533
|
function mapWebSearchOutput(action) {
|
|
4531
4534
|
var _a;
|
|
4535
|
+
if (action == null) {
|
|
4536
|
+
return {};
|
|
4537
|
+
}
|
|
4532
4538
|
switch (action.type) {
|
|
4533
4539
|
case "search":
|
|
4534
4540
|
return {
|