@ai-sdk/openai 3.0.0-beta.47 → 3.0.0-beta.49
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 +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +19 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -23
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +18 -22
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +18 -22
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1061,18 +1061,6 @@ function getSystemMessageMode(modelId) {
|
|
|
1061
1061
|
return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : "developer";
|
|
1062
1062
|
}
|
|
1063
1063
|
var reasoningModels = {
|
|
1064
|
-
"o1-mini": {
|
|
1065
|
-
systemMessageMode: "remove"
|
|
1066
|
-
},
|
|
1067
|
-
"o1-mini-2024-09-12": {
|
|
1068
|
-
systemMessageMode: "remove"
|
|
1069
|
-
},
|
|
1070
|
-
"o1-preview": {
|
|
1071
|
-
systemMessageMode: "remove"
|
|
1072
|
-
},
|
|
1073
|
-
"o1-preview-2024-09-12": {
|
|
1074
|
-
systemMessageMode: "remove"
|
|
1075
|
-
},
|
|
1076
1064
|
o3: {
|
|
1077
1065
|
systemMessageMode: "developer"
|
|
1078
1066
|
},
|
|
@@ -1982,7 +1970,12 @@ var webSearchOutputSchema = lazySchema12(
|
|
|
1982
1970
|
pattern: z13.string()
|
|
1983
1971
|
})
|
|
1984
1972
|
]),
|
|
1985
|
-
sources: z13.array(
|
|
1973
|
+
sources: z13.array(
|
|
1974
|
+
z13.discriminatedUnion("type", [
|
|
1975
|
+
z13.object({ type: z13.literal("url"), url: z13.string() }),
|
|
1976
|
+
z13.object({ type: z13.literal("api"), name: z13.string() })
|
|
1977
|
+
])
|
|
1978
|
+
).optional()
|
|
1986
1979
|
})
|
|
1987
1980
|
)
|
|
1988
1981
|
);
|
|
@@ -2603,7 +2596,12 @@ var openaiResponsesChunkSchema = lazySchema14(
|
|
|
2603
2596
|
z16.object({
|
|
2604
2597
|
type: z16.literal("search"),
|
|
2605
2598
|
query: z16.string().nullish(),
|
|
2606
|
-
sources: z16.array(
|
|
2599
|
+
sources: z16.array(
|
|
2600
|
+
z16.discriminatedUnion("type", [
|
|
2601
|
+
z16.object({ type: z16.literal("url"), url: z16.string() }),
|
|
2602
|
+
z16.object({ type: z16.literal("api"), name: z16.string() })
|
|
2603
|
+
])
|
|
2604
|
+
).nullish()
|
|
2607
2605
|
}),
|
|
2608
2606
|
z16.object({
|
|
2609
2607
|
type: z16.literal("open_page"),
|
|
@@ -2790,7 +2788,12 @@ var openaiResponsesResponseSchema = lazySchema14(
|
|
|
2790
2788
|
z16.object({
|
|
2791
2789
|
type: z16.literal("search"),
|
|
2792
2790
|
query: z16.string().nullish(),
|
|
2793
|
-
sources: z16.array(
|
|
2791
|
+
sources: z16.array(
|
|
2792
|
+
z16.discriminatedUnion("type", [
|
|
2793
|
+
z16.object({ type: z16.literal("url"), url: z16.string() }),
|
|
2794
|
+
z16.object({ type: z16.literal("api"), name: z16.string() })
|
|
2795
|
+
])
|
|
2796
|
+
).nullish()
|
|
2794
2797
|
}),
|
|
2795
2798
|
z16.object({
|
|
2796
2799
|
type: z16.literal("open_page"),
|
|
@@ -4148,13 +4151,6 @@ function getResponsesModelConfig(modelId) {
|
|
|
4148
4151
|
};
|
|
4149
4152
|
}
|
|
4150
4153
|
if (modelId.startsWith("o") || modelId.startsWith("gpt-5") || modelId.startsWith("codex-") || modelId.startsWith("computer-use")) {
|
|
4151
|
-
if (modelId.startsWith("o1-mini") || modelId.startsWith("o1-preview")) {
|
|
4152
|
-
return {
|
|
4153
|
-
...defaults,
|
|
4154
|
-
isReasoningModel: true,
|
|
4155
|
-
systemMessageMode: "remove"
|
|
4156
|
-
};
|
|
4157
|
-
}
|
|
4158
4154
|
return {
|
|
4159
4155
|
...defaults,
|
|
4160
4156
|
isReasoningModel: true,
|
|
@@ -4549,7 +4545,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4549
4545
|
};
|
|
4550
4546
|
|
|
4551
4547
|
// src/version.ts
|
|
4552
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4548
|
+
var VERSION = true ? "3.0.0-beta.49" : "0.0.0-test";
|
|
4553
4549
|
|
|
4554
4550
|
// src/openai-provider.ts
|
|
4555
4551
|
function createOpenAI(options = {}) {
|