@ai-sdk/openai 4.0.61 → 4.0.62
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 +6 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +8 -7
- package/dist/internal/index.js +4 -3
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +24 -1
- package/package.json +1 -1
- package/src/image/openai-image-model-options.ts +3 -2
- package/src/openai-tools.ts +1 -1
- package/src/responses/openai-responses-api.ts +1 -1
- package/src/tool/image-generation.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 4.0.62
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8487955: Add `xhigh` and `max` quality support for GPT Image 2.5 Flare and Sunburst in image generation, image editing, and the Responses API image generation tool.
|
|
8
|
+
|
|
3
9
|
## 4.0.61
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOption
|
|
|
49
49
|
|
|
50
50
|
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | 'gpt-image-2' | 'chatgpt-image-latest' | (string & {});
|
|
51
51
|
declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
52
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
52
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
53
53
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
54
54
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
55
55
|
outputCompression?: number | undefined;
|
|
@@ -57,7 +57,7 @@ declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
57
57
|
}>;
|
|
58
58
|
type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
|
|
59
59
|
declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
60
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
60
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
61
61
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
62
62
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
63
63
|
outputCompression?: number | undefined;
|
|
@@ -67,7 +67,7 @@ declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySche
|
|
|
67
67
|
}>;
|
|
68
68
|
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
69
69
|
declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
70
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
70
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
71
71
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
72
72
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
73
73
|
outputCompression?: number | undefined;
|
|
@@ -1134,7 +1134,7 @@ declare const openaiTools: {
|
|
|
1134
1134
|
* @param outputCompression - Compression level for the output image (0-100).
|
|
1135
1135
|
* @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
|
|
1136
1136
|
* @param partialImages - Number of partial images to generate in streaming mode (0-3).
|
|
1137
|
-
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or '
|
|
1137
|
+
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', 'high', 'xhigh', or 'max'. 'xhigh' and 'max' require a GPT Image 2.5 model.
|
|
1138
1138
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
1139
1139
|
*/
|
|
1140
1140
|
imageGeneration: (args?: {
|
|
@@ -1150,7 +1150,7 @@ declare const openaiTools: {
|
|
|
1150
1150
|
outputCompression?: number;
|
|
1151
1151
|
outputFormat?: "png" | "jpeg" | "webp";
|
|
1152
1152
|
partialImages?: number;
|
|
1153
|
-
quality?: "auto" | "low" | "medium" | "high";
|
|
1153
|
+
quality?: "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
1154
1154
|
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024" | (string & {});
|
|
1155
1155
|
}) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
|
|
1156
1156
|
result: string;
|
package/dist/index.js
CHANGED
|
@@ -2417,9 +2417,10 @@ var baseImageModelOptionsObject = z11.object({
|
|
|
2417
2417
|
/**
|
|
2418
2418
|
* Quality of the generated image(s).
|
|
2419
2419
|
*
|
|
2420
|
-
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
|
|
2420
|
+
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `xhigh`, `max`, `auto`.
|
|
2421
|
+
* `xhigh` and `max` are supported by GPT Image 2.5 models.
|
|
2421
2422
|
*/
|
|
2422
|
-
quality: z11.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
|
|
2423
|
+
quality: z11.enum(["standard", "hd", "low", "medium", "high", "xhigh", "max", "auto"]).optional(),
|
|
2423
2424
|
/**
|
|
2424
2425
|
* Background behavior for the generated image(s).
|
|
2425
2426
|
*
|
|
@@ -2993,7 +2994,7 @@ var imageGenerationArgsSchema = lazySchema16(
|
|
|
2993
2994
|
outputCompression: z17.number().int().min(0).max(100).optional(),
|
|
2994
2995
|
outputFormat: z17.enum(["png", "jpeg", "webp"]).optional(),
|
|
2995
2996
|
partialImages: z17.number().int().min(0).max(3).optional(),
|
|
2996
|
-
quality: z17.enum(["auto", "low", "medium", "high"]).optional(),
|
|
2997
|
+
quality: z17.enum(["auto", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
2997
2998
|
size: z17.union([
|
|
2998
2999
|
z17.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]),
|
|
2999
3000
|
z17.string().regex(/^\d+x\d+$/)
|
|
@@ -3474,7 +3475,7 @@ var openaiTools = {
|
|
|
3474
3475
|
* @param outputCompression - Compression level for the output image (0-100).
|
|
3475
3476
|
* @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
|
|
3476
3477
|
* @param partialImages - Number of partial images to generate in streaming mode (0-3).
|
|
3477
|
-
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or '
|
|
3478
|
+
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', 'high', 'xhigh', or 'max'. 'xhigh' and 'max' require a GPT Image 2.5 model.
|
|
3478
3479
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
3479
3480
|
*/
|
|
3480
3481
|
imageGeneration,
|
|
@@ -11187,7 +11188,7 @@ var OpenAISkills = class {
|
|
|
11187
11188
|
};
|
|
11188
11189
|
|
|
11189
11190
|
// src/version.ts
|
|
11190
|
-
var VERSION = true ? "4.0.
|
|
11191
|
+
var VERSION = true ? "4.0.62" : "0.0.0-test";
|
|
11191
11192
|
|
|
11192
11193
|
// src/openai-provider.ts
|
|
11193
11194
|
function createOpenAI(options = {}) {
|