@ai-sdk/openai 3.0.0-beta.18 → 3.0.0-beta.20
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -5
- 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 +24 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +24 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -457,13 +457,15 @@ var openaiChatLanguageModelOptions = lazyValidator2(
|
|
|
457
457
|
structuredOutputs: z3.boolean().optional(),
|
|
458
458
|
/**
|
|
459
459
|
* Service tier for the request.
|
|
460
|
-
* - 'auto': Default service tier
|
|
460
|
+
* - 'auto': Default service tier. The request will be processed with the service tier configured in the
|
|
461
|
+
* Project settings. Unless otherwise configured, the Project will use 'default'.
|
|
461
462
|
* - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
|
|
462
463
|
* - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
|
|
464
|
+
* - 'default': The request will be processed with the standard pricing and performance for the selected model.
|
|
463
465
|
*
|
|
464
466
|
* @default 'auto'
|
|
465
467
|
*/
|
|
466
|
-
serviceTier: z3.enum(["auto", "flex", "priority"]).optional(),
|
|
468
|
+
serviceTier: z3.enum(["auto", "flex", "priority", "default"]).optional(),
|
|
467
469
|
/**
|
|
468
470
|
* Whether to use strict JSON schema validation.
|
|
469
471
|
*
|
|
@@ -2405,11 +2407,29 @@ async function convertToOpenAIResponsesInput({
|
|
|
2405
2407
|
case "execution-denied":
|
|
2406
2408
|
contentValue = (_j = output.reason) != null ? _j : "Tool execution denied.";
|
|
2407
2409
|
break;
|
|
2408
|
-
case "content":
|
|
2409
2410
|
case "json":
|
|
2410
2411
|
case "error-json":
|
|
2411
2412
|
contentValue = JSON.stringify(output.value);
|
|
2412
2413
|
break;
|
|
2414
|
+
case "content":
|
|
2415
|
+
contentValue = output.value.map((item) => {
|
|
2416
|
+
switch (item.type) {
|
|
2417
|
+
case "text": {
|
|
2418
|
+
return { type: "input_text", text: item.text };
|
|
2419
|
+
}
|
|
2420
|
+
case "media": {
|
|
2421
|
+
return item.mediaType.startsWith("image/") ? {
|
|
2422
|
+
type: "input_image",
|
|
2423
|
+
image_url: `data:${item.mediaType};base64,${item.data}`
|
|
2424
|
+
} : {
|
|
2425
|
+
type: "input_file",
|
|
2426
|
+
filename: "data",
|
|
2427
|
+
file_data: `data:${item.mediaType};base64,${item.data}`
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
});
|
|
2432
|
+
break;
|
|
2413
2433
|
}
|
|
2414
2434
|
input.push({
|
|
2415
2435
|
type: "function_call_output",
|
|
@@ -2976,7 +2996,7 @@ var openaiResponsesProviderOptionsSchema = lazyValidator9(
|
|
|
2976
2996
|
reasoningEffort: z17.string().nullish(),
|
|
2977
2997
|
reasoningSummary: z17.string().nullish(),
|
|
2978
2998
|
safetyIdentifier: z17.string().nullish(),
|
|
2979
|
-
serviceTier: z17.enum(["auto", "flex", "priority"]).nullish(),
|
|
2999
|
+
serviceTier: z17.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
2980
3000
|
store: z17.boolean().nullish(),
|
|
2981
3001
|
strictJsonSchema: z17.boolean().nullish(),
|
|
2982
3002
|
textVerbosity: z17.enum(["low", "medium", "high"]).nullish(),
|
|
@@ -4503,7 +4523,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4503
4523
|
};
|
|
4504
4524
|
|
|
4505
4525
|
// src/version.ts
|
|
4506
|
-
var VERSION = true ? "3.0.0-beta.
|
|
4526
|
+
var VERSION = true ? "3.0.0-beta.20" : "0.0.0-test";
|
|
4507
4527
|
|
|
4508
4528
|
// src/openai-provider.ts
|
|
4509
4529
|
function createOpenAI(options = {}) {
|