@ai-sdk/openai 2.0.6 → 2.0.7
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 +8 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +23 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -17
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +5 -0
- package/dist/internal/index.d.ts +5 -0
- package/dist/internal/index.js +23 -17
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +23 -17
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -218,6 +218,11 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
218
218
|
"reasoning.encrypted_content": "reasoning.encrypted_content";
|
|
219
219
|
"file_search_call.results": "file_search_call.results";
|
|
220
220
|
}>>>>;
|
|
221
|
+
textVerbosity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
222
|
+
low: "low";
|
|
223
|
+
medium: "medium";
|
|
224
|
+
high: "high";
|
|
225
|
+
}>>>;
|
|
221
226
|
}, z.core.$strip>;
|
|
222
227
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
223
228
|
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -218,6 +218,11 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
218
218
|
"reasoning.encrypted_content": "reasoning.encrypted_content";
|
|
219
219
|
"file_search_call.results": "file_search_call.results";
|
|
220
220
|
}>>>>;
|
|
221
|
+
textVerbosity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
222
|
+
low: "low";
|
|
223
|
+
medium: "medium";
|
|
224
|
+
high: "high";
|
|
225
|
+
}>>>;
|
|
221
226
|
}, z.core.$strip>;
|
|
222
227
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
223
228
|
|
package/dist/internal/index.js
CHANGED
|
@@ -684,7 +684,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
684
684
|
warnings.push({
|
|
685
685
|
type: "unsupported-setting",
|
|
686
686
|
setting: "serviceTier",
|
|
687
|
-
details: "flex processing is only available for o3
|
|
687
|
+
details: "flex processing is only available for o3, o4-mini, and gpt-5 models"
|
|
688
688
|
});
|
|
689
689
|
baseArgs.service_tier = void 0;
|
|
690
690
|
}
|
|
@@ -692,7 +692,7 @@ var OpenAIChatLanguageModel = class {
|
|
|
692
692
|
warnings.push({
|
|
693
693
|
type: "unsupported-setting",
|
|
694
694
|
setting: "serviceTier",
|
|
695
|
-
details: "priority processing is only available for supported models (
|
|
695
|
+
details: "priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"
|
|
696
696
|
});
|
|
697
697
|
baseArgs.service_tier = void 0;
|
|
698
698
|
}
|
|
@@ -1125,10 +1125,10 @@ function isReasoningModel(modelId) {
|
|
|
1125
1125
|
return modelId.startsWith("o") || modelId.startsWith("gpt-5");
|
|
1126
1126
|
}
|
|
1127
1127
|
function supportsFlexProcessing(modelId) {
|
|
1128
|
-
return modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
1128
|
+
return modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5");
|
|
1129
1129
|
}
|
|
1130
1130
|
function supportsPriorityProcessing(modelId) {
|
|
1131
|
-
return modelId.startsWith("gpt-4") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
1131
|
+
return modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
1132
1132
|
}
|
|
1133
1133
|
function getSystemMessageMode(modelId) {
|
|
1134
1134
|
var _a, _b;
|
|
@@ -2407,15 +2407,20 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2407
2407
|
temperature,
|
|
2408
2408
|
top_p: topP,
|
|
2409
2409
|
max_output_tokens: maxOutputTokens,
|
|
2410
|
-
...(responseFormat == null ? void 0 : responseFormat.type) === "json" && {
|
|
2410
|
+
...((responseFormat == null ? void 0 : responseFormat.type) === "json" || (openaiOptions == null ? void 0 : openaiOptions.textVerbosity)) && {
|
|
2411
2411
|
text: {
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2412
|
+
...(responseFormat == null ? void 0 : responseFormat.type) === "json" && {
|
|
2413
|
+
format: responseFormat.schema != null ? {
|
|
2414
|
+
type: "json_schema",
|
|
2415
|
+
strict: strictJsonSchema,
|
|
2416
|
+
name: (_b = responseFormat.name) != null ? _b : "response",
|
|
2417
|
+
description: responseFormat.description,
|
|
2418
|
+
schema: responseFormat.schema
|
|
2419
|
+
} : { type: "json_object" }
|
|
2420
|
+
},
|
|
2421
|
+
...(openaiOptions == null ? void 0 : openaiOptions.textVerbosity) && {
|
|
2422
|
+
verbosity: openaiOptions.textVerbosity
|
|
2423
|
+
}
|
|
2419
2424
|
}
|
|
2420
2425
|
},
|
|
2421
2426
|
// provider options:
|
|
@@ -2479,7 +2484,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2479
2484
|
warnings.push({
|
|
2480
2485
|
type: "unsupported-setting",
|
|
2481
2486
|
setting: "serviceTier",
|
|
2482
|
-
details: "flex processing is only available for o3
|
|
2487
|
+
details: "flex processing is only available for o3, o4-mini, and gpt-5 models"
|
|
2483
2488
|
});
|
|
2484
2489
|
delete baseArgs.service_tier;
|
|
2485
2490
|
}
|
|
@@ -2487,7 +2492,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2487
2492
|
warnings.push({
|
|
2488
2493
|
type: "unsupported-setting",
|
|
2489
2494
|
setting: "serviceTier",
|
|
2490
|
-
details: "priority processing is only available for supported models (
|
|
2495
|
+
details: "priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"
|
|
2491
2496
|
});
|
|
2492
2497
|
delete baseArgs.service_tier;
|
|
2493
2498
|
}
|
|
@@ -3243,10 +3248,10 @@ function getResponsesModelConfig(modelId) {
|
|
|
3243
3248
|
};
|
|
3244
3249
|
}
|
|
3245
3250
|
function supportsFlexProcessing2(modelId) {
|
|
3246
|
-
return modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
3251
|
+
return modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5");
|
|
3247
3252
|
}
|
|
3248
3253
|
function supportsPriorityProcessing2(modelId) {
|
|
3249
|
-
return modelId.startsWith("gpt-4") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
3254
|
+
return modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
3250
3255
|
}
|
|
3251
3256
|
var openaiResponsesProviderOptionsSchema = import_v415.z.object({
|
|
3252
3257
|
metadata: import_v415.z.any().nullish(),
|
|
@@ -3259,7 +3264,8 @@ var openaiResponsesProviderOptionsSchema = import_v415.z.object({
|
|
|
3259
3264
|
instructions: import_v415.z.string().nullish(),
|
|
3260
3265
|
reasoningSummary: import_v415.z.string().nullish(),
|
|
3261
3266
|
serviceTier: import_v415.z.enum(["auto", "flex", "priority"]).nullish(),
|
|
3262
|
-
include: import_v415.z.array(import_v415.z.enum(["reasoning.encrypted_content", "file_search_call.results"])).nullish()
|
|
3267
|
+
include: import_v415.z.array(import_v415.z.enum(["reasoning.encrypted_content", "file_search_call.results"])).nullish(),
|
|
3268
|
+
textVerbosity: import_v415.z.enum(["low", "medium", "high"]).nullish()
|
|
3263
3269
|
});
|
|
3264
3270
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3265
3271
|
0 && (module.exports = {
|