@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/internal/index.mjs
CHANGED
|
@@ -449,13 +449,15 @@ var openaiChatLanguageModelOptions = lazyValidator2(
|
|
|
449
449
|
structuredOutputs: z3.boolean().optional(),
|
|
450
450
|
/**
|
|
451
451
|
* Service tier for the request.
|
|
452
|
-
* - 'auto': Default service tier
|
|
452
|
+
* - 'auto': Default service tier. The request will be processed with the service tier configured in the
|
|
453
|
+
* Project settings. Unless otherwise configured, the Project will use 'default'.
|
|
453
454
|
* - 'flex': 50% cheaper processing at the cost of increased latency. Only available for o3 and o4-mini models.
|
|
454
455
|
* - 'priority': Higher-speed processing with predictably low latency at premium cost. Available for Enterprise customers.
|
|
456
|
+
* - 'default': The request will be processed with the standard pricing and performance for the selected model.
|
|
455
457
|
*
|
|
456
458
|
* @default 'auto'
|
|
457
459
|
*/
|
|
458
|
-
serviceTier: z3.enum(["auto", "flex", "priority"]).optional(),
|
|
460
|
+
serviceTier: z3.enum(["auto", "flex", "priority", "default"]).optional(),
|
|
459
461
|
/**
|
|
460
462
|
* Whether to use strict JSON schema validation.
|
|
461
463
|
*
|
|
@@ -2422,11 +2424,29 @@ async function convertToOpenAIResponsesInput({
|
|
|
2422
2424
|
case "execution-denied":
|
|
2423
2425
|
contentValue = (_j = output.reason) != null ? _j : "Tool execution denied.";
|
|
2424
2426
|
break;
|
|
2425
|
-
case "content":
|
|
2426
2427
|
case "json":
|
|
2427
2428
|
case "error-json":
|
|
2428
2429
|
contentValue = JSON.stringify(output.value);
|
|
2429
2430
|
break;
|
|
2431
|
+
case "content":
|
|
2432
|
+
contentValue = output.value.map((item) => {
|
|
2433
|
+
switch (item.type) {
|
|
2434
|
+
case "text": {
|
|
2435
|
+
return { type: "input_text", text: item.text };
|
|
2436
|
+
}
|
|
2437
|
+
case "media": {
|
|
2438
|
+
return item.mediaType.startsWith("image/") ? {
|
|
2439
|
+
type: "input_image",
|
|
2440
|
+
image_url: `data:${item.mediaType};base64,${item.data}`
|
|
2441
|
+
} : {
|
|
2442
|
+
type: "input_file",
|
|
2443
|
+
filename: "data",
|
|
2444
|
+
file_data: `data:${item.mediaType};base64,${item.data}`
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
break;
|
|
2430
2450
|
}
|
|
2431
2451
|
input.push({
|
|
2432
2452
|
type: "function_call_output",
|
|
@@ -2993,7 +3013,7 @@ var openaiResponsesProviderOptionsSchema = lazyValidator12(
|
|
|
2993
3013
|
reasoningEffort: z15.string().nullish(),
|
|
2994
3014
|
reasoningSummary: z15.string().nullish(),
|
|
2995
3015
|
safetyIdentifier: z15.string().nullish(),
|
|
2996
|
-
serviceTier: z15.enum(["auto", "flex", "priority"]).nullish(),
|
|
3016
|
+
serviceTier: z15.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
2997
3017
|
store: z15.boolean().nullish(),
|
|
2998
3018
|
strictJsonSchema: z15.boolean().nullish(),
|
|
2999
3019
|
textVerbosity: z15.enum(["low", "medium", "high"]).nullish(),
|