@ai-sdk/openai 3.0.65 → 3.0.67
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +196 -1
- package/dist/internal/index.d.ts +196 -1
- package/dist/internal/index.js +20 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +15 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/internal/index.ts +1 -0
- package/src/responses/openai-responses-api.ts +2 -0
- package/src/responses/openai-responses-language-model.ts +5 -1
- package/src/tool/web-search.ts +8 -0
package/dist/internal/index.mjs
CHANGED
|
@@ -3629,6 +3629,7 @@ var openaiResponsesChunkSchema = lazySchema16(
|
|
|
3629
3629
|
z18.object({
|
|
3630
3630
|
type: z18.literal("search"),
|
|
3631
3631
|
query: z18.string().nullish(),
|
|
3632
|
+
queries: z18.array(z18.string()).nullish(),
|
|
3632
3633
|
sources: z18.array(
|
|
3633
3634
|
z18.discriminatedUnion("type", [
|
|
3634
3635
|
z18.object({ type: z18.literal("url"), url: z18.string() }),
|
|
@@ -3981,6 +3982,7 @@ var openaiResponsesResponseSchema = lazySchema16(
|
|
|
3981
3982
|
z18.object({
|
|
3982
3983
|
type: z18.literal("search"),
|
|
3983
3984
|
query: z18.string().nullish(),
|
|
3985
|
+
queries: z18.array(z18.string()).nullish(),
|
|
3984
3986
|
sources: z18.array(
|
|
3985
3987
|
z18.discriminatedUnion("type", [
|
|
3986
3988
|
z18.object({ type: z18.literal("url"), url: z18.string() }),
|
|
@@ -4729,7 +4731,8 @@ var webSearchOutputSchema = lazySchema23(
|
|
|
4729
4731
|
action: z25.discriminatedUnion("type", [
|
|
4730
4732
|
z25.object({
|
|
4731
4733
|
type: z25.literal("search"),
|
|
4732
|
-
query: z25.string().optional()
|
|
4734
|
+
query: z25.string().optional(),
|
|
4735
|
+
queries: z25.array(z25.string()).optional()
|
|
4733
4736
|
}),
|
|
4734
4737
|
z25.object({
|
|
4735
4738
|
type: z25.literal("openPage"),
|
|
@@ -4755,6 +4758,7 @@ var webSearchToolFactory = createProviderToolFactoryWithOutputSchema9({
|
|
|
4755
4758
|
inputSchema: webSearchInputSchema,
|
|
4756
4759
|
outputSchema: webSearchOutputSchema
|
|
4757
4760
|
});
|
|
4761
|
+
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
4758
4762
|
|
|
4759
4763
|
// src/tool/web-search-preview.ts
|
|
4760
4764
|
import {
|
|
@@ -6780,7 +6784,11 @@ function mapWebSearchOutput(action) {
|
|
|
6780
6784
|
switch (action.type) {
|
|
6781
6785
|
case "search":
|
|
6782
6786
|
return {
|
|
6783
|
-
action: {
|
|
6787
|
+
action: {
|
|
6788
|
+
type: "search",
|
|
6789
|
+
query: (_a = action.query) != null ? _a : void 0,
|
|
6790
|
+
...action.queries != null && { queries: action.queries }
|
|
6791
|
+
},
|
|
6784
6792
|
// include sources when provided by the Responses API (behind include flag)
|
|
6785
6793
|
...action.sources != null && { sources: action.sources }
|
|
6786
6794
|
};
|
|
@@ -6833,8 +6841,12 @@ export {
|
|
|
6833
6841
|
openaiLanguageModelChatOptions,
|
|
6834
6842
|
openaiLanguageModelCompletionOptions,
|
|
6835
6843
|
openaiSpeechModelOptionsSchema,
|
|
6844
|
+
webSearch,
|
|
6845
|
+
webSearchArgsSchema,
|
|
6846
|
+
webSearchOutputSchema,
|
|
6836
6847
|
webSearchPreview,
|
|
6837
6848
|
webSearchPreviewArgsSchema,
|
|
6838
|
-
webSearchPreviewInputSchema
|
|
6849
|
+
webSearchPreviewInputSchema,
|
|
6850
|
+
webSearchToolFactory
|
|
6839
6851
|
};
|
|
6840
6852
|
//# sourceMappingURL=index.mjs.map
|