@ai-sdk/openai 3.0.110 → 3.0.111
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 +7 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +10 -3
- package/dist/internal/index.d.ts +10 -3
- package/dist/internal/index.js +10 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -0
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +21 -12
- package/package.json +1 -1
- package/src/image/openai-image-model-options.ts +8 -0
- package/src/openai-config.ts +5 -0
- package/src/responses/convert-to-openai-responses-input.ts +6 -0
- package/src/responses/openai-responses-api.ts +3 -0
- package/src/responses/openai-responses-language-model.ts +1 -0
- package/src/tool/image-generation.ts +4 -2
package/dist/index.mjs
CHANGED
|
@@ -2091,6 +2091,10 @@ var modelMaxImagesPerCall = {
|
|
|
2091
2091
|
"gpt-image-1-mini": 10,
|
|
2092
2092
|
"gpt-image-1.5": 10,
|
|
2093
2093
|
"gpt-image-2": 10,
|
|
2094
|
+
"gpt-image-2.5-flare": 10,
|
|
2095
|
+
"gpt-image-2.5-flare-2026-09-08": 10,
|
|
2096
|
+
"gpt-image-2.5-sunburst": 10,
|
|
2097
|
+
"gpt-image-2.5-sunburst-2026-09-08": 10,
|
|
2094
2098
|
"chatgpt-image-latest": 10
|
|
2095
2099
|
};
|
|
2096
2100
|
var defaultResponseFormatPrefixes = ["chatgpt-image-", "gpt-image-"];
|
|
@@ -3387,6 +3391,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3387
3391
|
toolNameMapping,
|
|
3388
3392
|
systemMessageMode,
|
|
3389
3393
|
providerOptionsName,
|
|
3394
|
+
explicitMessageItemType = false,
|
|
3390
3395
|
fileIdPrefixes,
|
|
3391
3396
|
passThroughUnsupportedFiles = false,
|
|
3392
3397
|
store,
|
|
@@ -3418,6 +3423,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3418
3423
|
providerOptionsName
|
|
3419
3424
|
);
|
|
3420
3425
|
input.push({
|
|
3426
|
+
...explicitMessageItemType && { type: "message" },
|
|
3421
3427
|
role: "system",
|
|
3422
3428
|
content: promptCacheBreakpoint == null ? content : [
|
|
3423
3429
|
{
|
|
@@ -3435,6 +3441,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3435
3441
|
providerOptionsName
|
|
3436
3442
|
);
|
|
3437
3443
|
input.push({
|
|
3444
|
+
...explicitMessageItemType && { type: "message" },
|
|
3438
3445
|
role: "developer",
|
|
3439
3446
|
content: promptCacheBreakpoint == null ? content : [
|
|
3440
3447
|
{
|
|
@@ -3464,6 +3471,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3464
3471
|
}
|
|
3465
3472
|
case "user": {
|
|
3466
3473
|
input.push({
|
|
3474
|
+
...explicitMessageItemType && { type: "message" },
|
|
3467
3475
|
role: "user",
|
|
3468
3476
|
content: content.map((part, index) => {
|
|
3469
3477
|
var _a3, _b2, _c2;
|
|
@@ -3545,6 +3553,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3545
3553
|
break;
|
|
3546
3554
|
}
|
|
3547
3555
|
input.push({
|
|
3556
|
+
...explicitMessageItemType && { type: "message" },
|
|
3548
3557
|
role: "assistant",
|
|
3549
3558
|
content: [{ type: "output_text", text: part.text }],
|
|
3550
3559
|
id,
|
|
@@ -5987,6 +5996,7 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
5987
5996
|
toolNameMapping,
|
|
5988
5997
|
systemMessageMode: (_c = openaiOptions == null ? void 0 : openaiOptions.systemMessageMode) != null ? _c : isReasoningModel ? "developer" : modelCapabilities.systemMessageMode,
|
|
5989
5998
|
providerOptionsName,
|
|
5999
|
+
explicitMessageItemType: this.config.explicitMessageItemType,
|
|
5990
6000
|
fileIdPrefixes: this.config.fileIdPrefixes,
|
|
5991
6001
|
passThroughUnsupportedFiles: (_d = openaiOptions == null ? void 0 : openaiOptions.passThroughUnsupportedFiles) != null ? _d : false,
|
|
5992
6002
|
store: (_e = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _e : true,
|
|
@@ -8216,7 +8226,7 @@ var OpenAITranscriptionModel = class {
|
|
|
8216
8226
|
};
|
|
8217
8227
|
|
|
8218
8228
|
// src/version.ts
|
|
8219
|
-
var VERSION = true ? "3.0.
|
|
8229
|
+
var VERSION = true ? "3.0.111" : "0.0.0-test";
|
|
8220
8230
|
|
|
8221
8231
|
// src/openai-provider.ts
|
|
8222
8232
|
function createOpenAI(options = {}) {
|