@ai-sdk/openai 2.0.99 → 2.0.101
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 +25 -13
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +2 -2
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +20 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +17 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.0.101
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 316517c: Add `gpt-5.4-mini`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano`, and `gpt-5.4-nano-2026-03-17` models.
|
|
8
|
+
|
|
9
|
+
## 2.0.100
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 216151a: fix(provider/openai): drop reasoning parts without encrypted content when store: false
|
|
14
|
+
|
|
3
15
|
## 2.0.99
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -420,15 +432,15 @@
|
|
|
420
432
|
- 1cfc209: feat(provider/openai): `OpenAIChatLanguageModelOptions` type
|
|
421
433
|
|
|
422
434
|
```ts
|
|
423
|
-
import { openai, type OpenAIChatLanguageModelOptions } from
|
|
424
|
-
import { generateText } from
|
|
435
|
+
import { openai, type OpenAIChatLanguageModelOptions } from "@ai-sdk/openai";
|
|
436
|
+
import { generateText } from "ai";
|
|
425
437
|
|
|
426
438
|
await generateText({
|
|
427
|
-
model: openai.chat(
|
|
428
|
-
prompt:
|
|
439
|
+
model: openai.chat("gpt-4o"),
|
|
440
|
+
prompt: "Invent a new holiday and describe its traditions.",
|
|
429
441
|
providerOptions: {
|
|
430
442
|
openai: {
|
|
431
|
-
user:
|
|
443
|
+
user: "user-123",
|
|
432
444
|
} satisfies OpenAIChatLanguageModelOptions,
|
|
433
445
|
},
|
|
434
446
|
});
|
|
@@ -706,7 +718,7 @@
|
|
|
706
718
|
|
|
707
719
|
```js
|
|
708
720
|
await generateImage({
|
|
709
|
-
model: luma.image(
|
|
721
|
+
model: luma.image("photon-flash-1", {
|
|
710
722
|
maxImagesPerCall: 5,
|
|
711
723
|
pollIntervalMillis: 500,
|
|
712
724
|
}),
|
|
@@ -719,7 +731,7 @@
|
|
|
719
731
|
|
|
720
732
|
```js
|
|
721
733
|
await generateImage({
|
|
722
|
-
model: luma.image(
|
|
734
|
+
model: luma.image("photon-flash-1"),
|
|
723
735
|
prompt,
|
|
724
736
|
n: 10,
|
|
725
737
|
maxImagesPerCall: 5,
|
|
@@ -781,10 +793,10 @@
|
|
|
781
793
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
782
794
|
|
|
783
795
|
```js
|
|
784
|
-
const prompt =
|
|
796
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
785
797
|
|
|
786
798
|
const { providerMetadata } = await experimental_generateImage({
|
|
787
|
-
model: openai.image(
|
|
799
|
+
model: openai.image("dall-e-3"),
|
|
788
800
|
prompt,
|
|
789
801
|
});
|
|
790
802
|
|
|
@@ -1207,7 +1219,7 @@
|
|
|
1207
1219
|
|
|
1208
1220
|
```js
|
|
1209
1221
|
await generateImage({
|
|
1210
|
-
model: luma.image(
|
|
1222
|
+
model: luma.image("photon-flash-1", {
|
|
1211
1223
|
maxImagesPerCall: 5,
|
|
1212
1224
|
pollIntervalMillis: 500,
|
|
1213
1225
|
}),
|
|
@@ -1220,7 +1232,7 @@
|
|
|
1220
1232
|
|
|
1221
1233
|
```js
|
|
1222
1234
|
await generateImage({
|
|
1223
|
-
model: luma.image(
|
|
1235
|
+
model: luma.image("photon-flash-1"),
|
|
1224
1236
|
prompt,
|
|
1225
1237
|
n: 10,
|
|
1226
1238
|
maxImagesPerCall: 5,
|
|
@@ -1268,10 +1280,10 @@
|
|
|
1268
1280
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
1269
1281
|
|
|
1270
1282
|
```js
|
|
1271
|
-
const prompt =
|
|
1283
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
1272
1284
|
|
|
1273
1285
|
const { providerMetadata } = await experimental_generateImage({
|
|
1274
|
-
model: openai.image(
|
|
1286
|
+
model: openai.image("dall-e-3"),
|
|
1275
1287
|
prompt,
|
|
1276
1288
|
});
|
|
1277
1289
|
|
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2, Transcript
|
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
|
|
5
|
-
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | (string & {});
|
|
5
|
+
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | (string & {});
|
|
6
6
|
declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
|
|
7
7
|
logitBias?: Record<number, number> | undefined;
|
|
8
8
|
logprobs?: number | boolean | undefined;
|
|
@@ -329,7 +329,7 @@ declare const openaiTools: {
|
|
|
329
329
|
}>;
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
332
|
+
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
333
333
|
declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
|
|
334
334
|
conversation?: string | null | undefined;
|
|
335
335
|
include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ProviderV2, LanguageModelV2, EmbeddingModelV2, ImageModelV2, Transcript
|
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { InferValidator, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
|
|
5
|
-
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | (string & {});
|
|
5
|
+
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | (string & {});
|
|
6
6
|
declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazyValidator<{
|
|
7
7
|
logitBias?: Record<number, number> | undefined;
|
|
8
8
|
logprobs?: number | boolean | undefined;
|
|
@@ -329,7 +329,7 @@ declare const openaiTools: {
|
|
|
329
329
|
}>;
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
332
|
+
type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
|
|
333
333
|
declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyValidator<{
|
|
334
334
|
conversation?: string | null | undefined;
|
|
335
335
|
include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
VERSION: () => VERSION,
|
|
24
24
|
createOpenAI: () => createOpenAI,
|
|
25
25
|
openai: () => openai
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
28
|
|
|
29
29
|
// src/openai-provider.ts
|
|
30
30
|
var import_provider_utils30 = require("@ai-sdk/provider-utils");
|
|
@@ -55,7 +55,7 @@ var openaiFailedResponseHandler = (0, import_provider_utils.createJsonErrorRespo
|
|
|
55
55
|
// src/openai-language-model-capabilities.ts
|
|
56
56
|
function getOpenAILanguageModelCapabilities(modelId) {
|
|
57
57
|
const supportsFlexProcessing = modelId.startsWith("o3") || modelId.startsWith("o4-mini") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-chat");
|
|
58
|
-
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5
|
|
58
|
+
const supportsPriorityProcessing = modelId.startsWith("gpt-4") || modelId.startsWith("gpt-5") && !modelId.startsWith("gpt-5-nano") && !modelId.startsWith("gpt-5-chat") && !modelId.startsWith("gpt-5.4-nano") || modelId.startsWith("o3") || modelId.startsWith("o4-mini");
|
|
59
59
|
const isReasoningModel = !(modelId.startsWith("gpt-3") || modelId.startsWith("gpt-4") || modelId.startsWith("chatgpt-4o") || modelId.startsWith("gpt-5-chat"));
|
|
60
60
|
const supportsNonReasoningParameters = modelId.startsWith("gpt-5.1") || modelId.startsWith("gpt-5.2") || modelId.startsWith("gpt-5.3") || modelId.startsWith("gpt-5.4");
|
|
61
61
|
const systemMessageMode = isReasoningModel ? "developer" : "system";
|
|
@@ -2146,7 +2146,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2146
2146
|
hasLocalShellTool = false
|
|
2147
2147
|
}) {
|
|
2148
2148
|
var _a, _b, _c, _d, _e, _f;
|
|
2149
|
-
|
|
2149
|
+
let input = [];
|
|
2150
2150
|
const warnings = [];
|
|
2151
2151
|
for (const { role, content } of prompt) {
|
|
2152
2152
|
switch (role) {
|
|
@@ -2408,6 +2408,17 @@ async function convertToOpenAIResponsesInput({
|
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
2410
|
}
|
|
2411
|
+
if (!store && input.some(
|
|
2412
|
+
(item) => "type" in item && item.type === "reasoning" && item.encrypted_content == null
|
|
2413
|
+
)) {
|
|
2414
|
+
warnings.push({
|
|
2415
|
+
type: "other",
|
|
2416
|
+
message: "Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts."
|
|
2417
|
+
});
|
|
2418
|
+
input = input.filter(
|
|
2419
|
+
(item) => !("type" in item) || item.type !== "reasoning" || item.encrypted_content != null
|
|
2420
|
+
);
|
|
2421
|
+
}
|
|
2411
2422
|
return { input, warnings };
|
|
2412
2423
|
}
|
|
2413
2424
|
var openaiResponsesReasoningProviderOptionsSchema = import_v415.z.object({
|
|
@@ -2936,6 +2947,10 @@ var openaiResponsesReasoningModelIds = [
|
|
|
2936
2947
|
"gpt-5.3-codex",
|
|
2937
2948
|
"gpt-5.4",
|
|
2938
2949
|
"gpt-5.4-2026-03-05",
|
|
2950
|
+
"gpt-5.4-mini",
|
|
2951
|
+
"gpt-5.4-mini-2026-03-17",
|
|
2952
|
+
"gpt-5.4-nano",
|
|
2953
|
+
"gpt-5.4-nano-2026-03-17",
|
|
2939
2954
|
"gpt-5.4-pro",
|
|
2940
2955
|
"gpt-5.4-pro-2026-03-05"
|
|
2941
2956
|
];
|
|
@@ -4625,7 +4640,7 @@ var OpenAITranscriptionModel = class {
|
|
|
4625
4640
|
};
|
|
4626
4641
|
|
|
4627
4642
|
// src/version.ts
|
|
4628
|
-
var VERSION = true ? "2.0.
|
|
4643
|
+
var VERSION = true ? "2.0.101" : "0.0.0-test";
|
|
4629
4644
|
|
|
4630
4645
|
// src/openai-provider.ts
|
|
4631
4646
|
function createOpenAI(options = {}) {
|