@ai-sdk/openai 2.0.84 → 2.0.86
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 +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +27 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -19
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +3 -3
- package/dist/internal/index.d.ts +3 -3
- package/dist/internal/index.js +26 -18
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +26 -18
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -295,10 +295,12 @@ var openaiChatResponseSchema = lazyValidator(
|
|
|
295
295
|
annotations: z2.array(
|
|
296
296
|
z2.object({
|
|
297
297
|
type: z2.literal("url_citation"),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
298
|
+
url_citation: z2.object({
|
|
299
|
+
start_index: z2.number(),
|
|
300
|
+
end_index: z2.number(),
|
|
301
|
+
url: z2.string(),
|
|
302
|
+
title: z2.string()
|
|
303
|
+
})
|
|
302
304
|
})
|
|
303
305
|
).nullish()
|
|
304
306
|
}),
|
|
@@ -362,10 +364,12 @@ var openaiChatChunkSchema = lazyValidator(
|
|
|
362
364
|
annotations: z2.array(
|
|
363
365
|
z2.object({
|
|
364
366
|
type: z2.literal("url_citation"),
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
url_citation: z2.object({
|
|
368
|
+
start_index: z2.number(),
|
|
369
|
+
end_index: z2.number(),
|
|
370
|
+
url: z2.string(),
|
|
371
|
+
title: z2.string()
|
|
372
|
+
})
|
|
369
373
|
})
|
|
370
374
|
).nullish()
|
|
371
375
|
}).nullish(),
|
|
@@ -824,8 +828,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
824
828
|
type: "source",
|
|
825
829
|
sourceType: "url",
|
|
826
830
|
id: generateId(),
|
|
827
|
-
url: annotation.url,
|
|
828
|
-
title: annotation.title
|
|
831
|
+
url: annotation.url_citation.url,
|
|
832
|
+
title: annotation.url_citation.title
|
|
829
833
|
});
|
|
830
834
|
}
|
|
831
835
|
const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
|
|
@@ -1054,8 +1058,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
1054
1058
|
type: "source",
|
|
1055
1059
|
sourceType: "url",
|
|
1056
1060
|
id: generateId(),
|
|
1057
|
-
url: annotation.url,
|
|
1058
|
-
title: annotation.title
|
|
1061
|
+
url: annotation.url_citation.url,
|
|
1062
|
+
title: annotation.url_citation.title
|
|
1059
1063
|
});
|
|
1060
1064
|
}
|
|
1061
1065
|
}
|
|
@@ -1990,7 +1994,7 @@ var webSearchOutputSchema = lazySchema5(
|
|
|
1990
1994
|
url: z13.string().nullish()
|
|
1991
1995
|
}),
|
|
1992
1996
|
z13.object({
|
|
1993
|
-
type: z13.literal("
|
|
1997
|
+
type: z13.literal("findInPage"),
|
|
1994
1998
|
url: z13.string().nullish(),
|
|
1995
1999
|
pattern: z13.string().nullish()
|
|
1996
2000
|
})
|
|
@@ -2049,7 +2053,7 @@ var webSearchPreviewOutputSchema = lazySchema6(
|
|
|
2049
2053
|
url: z14.string().nullish()
|
|
2050
2054
|
}),
|
|
2051
2055
|
z14.object({
|
|
2052
|
-
type: z14.literal("
|
|
2056
|
+
type: z14.literal("findInPage"),
|
|
2053
2057
|
url: z14.string().nullish(),
|
|
2054
2058
|
pattern: z14.string().nullish()
|
|
2055
2059
|
})
|
|
@@ -2616,7 +2620,7 @@ var openaiResponsesChunkSchema = lazyValidator8(
|
|
|
2616
2620
|
url: z16.string().nullish()
|
|
2617
2621
|
}),
|
|
2618
2622
|
z16.object({
|
|
2619
|
-
type: z16.literal("
|
|
2623
|
+
type: z16.literal("find_in_page"),
|
|
2620
2624
|
url: z16.string().nullish(),
|
|
2621
2625
|
pattern: z16.string().nullish()
|
|
2622
2626
|
})
|
|
@@ -2826,7 +2830,7 @@ var openaiResponsesResponseSchema = lazyValidator8(
|
|
|
2826
2830
|
url: z16.string().nullish()
|
|
2827
2831
|
}),
|
|
2828
2832
|
z16.object({
|
|
2829
|
-
type: z16.literal("
|
|
2833
|
+
type: z16.literal("find_in_page"),
|
|
2830
2834
|
url: z16.string().nullish(),
|
|
2831
2835
|
pattern: z16.string().nullish()
|
|
2832
2836
|
})
|
|
@@ -4268,9 +4272,13 @@ function mapWebSearchOutput(action) {
|
|
|
4268
4272
|
};
|
|
4269
4273
|
case "open_page":
|
|
4270
4274
|
return { action: { type: "openPage", url: action.url } };
|
|
4271
|
-
case "
|
|
4275
|
+
case "find_in_page":
|
|
4272
4276
|
return {
|
|
4273
|
-
action: {
|
|
4277
|
+
action: {
|
|
4278
|
+
type: "findInPage",
|
|
4279
|
+
url: action.url,
|
|
4280
|
+
pattern: action.pattern
|
|
4281
|
+
}
|
|
4274
4282
|
};
|
|
4275
4283
|
}
|
|
4276
4284
|
}
|
|
@@ -4646,7 +4654,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4646
4654
|
};
|
|
4647
4655
|
|
|
4648
4656
|
// src/version.ts
|
|
4649
|
-
var VERSION = true ? "2.0.
|
|
4657
|
+
var VERSION = true ? "2.0.86" : "0.0.0-test";
|
|
4650
4658
|
|
|
4651
4659
|
// src/openai-provider.ts
|
|
4652
4660
|
function createOpenAI(options = {}) {
|