@ai-sdk/openai 3.0.107 → 3.0.109

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.109
4
+
5
+ ### Patch Changes
6
+
7
+ - 7f3b8f0: feat(openai): add GPT-6 reasoning configuration updates
8
+
9
+ ## 3.0.108
10
+
11
+ ### Patch Changes
12
+
13
+ - 019eec8: feat(openai): add support for the gpt-6-astra
14
+
3
15
  ## 3.0.107
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,13 +3,13 @@ import { JSONValue, ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3,
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-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-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | '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-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | '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' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | (string & {});
6
+ type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-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-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | '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-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | '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' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | (string & {});
7
7
  declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<{
8
8
  logitBias?: Record<number, number> | undefined;
9
9
  logprobs?: number | boolean | undefined;
10
10
  parallelToolCalls?: boolean | undefined;
11
11
  user?: string | undefined;
12
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
12
+ reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "none" | "minimal" | undefined;
13
13
  maxCompletionTokens?: number | undefined;
14
14
  store?: boolean | undefined;
15
15
  metadata?: Record<string, string> | undefined;
@@ -48,7 +48,7 @@ type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOption
48
48
 
49
49
  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 & {});
50
50
  declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
51
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
51
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
52
52
  background?: "auto" | "transparent" | "opaque" | undefined;
53
53
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
54
54
  outputCompression?: number | undefined;
@@ -56,17 +56,17 @@ declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
56
56
  }>;
57
57
  type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
58
58
  declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySchema<{
59
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
59
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
60
60
  background?: "auto" | "transparent" | "opaque" | undefined;
61
61
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
62
62
  outputCompression?: number | undefined;
63
63
  user?: string | undefined;
64
64
  style?: "vivid" | "natural" | undefined;
65
- moderation?: "auto" | "low" | undefined;
65
+ moderation?: "low" | "auto" | undefined;
66
66
  }>;
67
67
  type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
68
68
  declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
69
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
69
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
70
70
  background?: "auto" | "transparent" | "opaque" | undefined;
71
71
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
72
72
  outputCompression?: number | undefined;
@@ -1094,7 +1094,7 @@ declare const openaiTools: {
1094
1094
  }>;
1095
1095
  };
1096
1096
 
1097
- type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-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-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-2025-11-13' | '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-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | '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.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | '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' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
1097
+ type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-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-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-2025-11-13' | '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-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | '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.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | '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' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
1098
1098
  declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
1099
1099
  conversation?: string | null | undefined;
1100
1100
  include?: ("web_search_call.results" | "file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
@@ -1111,6 +1111,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1111
1111
  } | undefined;
1112
1112
  promptCacheRetention?: "in_memory" | "24h" | null | undefined;
1113
1113
  reasoningEffort?: string | null | undefined;
1114
+ reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1114
1115
  reasoningMode?: "standard" | "pro" | undefined;
1115
1116
  reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1116
1117
  reasoningSummary?: string | null | undefined;
package/dist/index.d.ts CHANGED
@@ -3,13 +3,13 @@ import { JSONValue, ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3,
3
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
4
  import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-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-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | '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-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | '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' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | (string & {});
6
+ type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-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-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | '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-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | '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' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | (string & {});
7
7
  declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<{
8
8
  logitBias?: Record<number, number> | undefined;
9
9
  logprobs?: number | boolean | undefined;
10
10
  parallelToolCalls?: boolean | undefined;
11
11
  user?: string | undefined;
12
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
12
+ reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "none" | "minimal" | undefined;
13
13
  maxCompletionTokens?: number | undefined;
14
14
  store?: boolean | undefined;
15
15
  metadata?: Record<string, string> | undefined;
@@ -48,7 +48,7 @@ type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOption
48
48
 
49
49
  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 & {});
50
50
  declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
51
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
51
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
52
52
  background?: "auto" | "transparent" | "opaque" | undefined;
53
53
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
54
54
  outputCompression?: number | undefined;
@@ -56,17 +56,17 @@ declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
56
56
  }>;
57
57
  type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
58
58
  declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySchema<{
59
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
59
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
60
60
  background?: "auto" | "transparent" | "opaque" | undefined;
61
61
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
62
62
  outputCompression?: number | undefined;
63
63
  user?: string | undefined;
64
64
  style?: "vivid" | "natural" | undefined;
65
- moderation?: "auto" | "low" | undefined;
65
+ moderation?: "low" | "auto" | undefined;
66
66
  }>;
67
67
  type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
68
68
  declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
69
- quality?: "auto" | "low" | "medium" | "high" | "standard" | "hd" | undefined;
69
+ quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
70
70
  background?: "auto" | "transparent" | "opaque" | undefined;
71
71
  outputFormat?: "png" | "jpeg" | "webp" | undefined;
72
72
  outputCompression?: number | undefined;
@@ -1094,7 +1094,7 @@ declare const openaiTools: {
1094
1094
  }>;
1095
1095
  };
1096
1096
 
1097
- type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-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-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-2025-11-13' | '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-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | '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.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | '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' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
1097
+ type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-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-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-2025-11-13' | '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-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | '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.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | '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' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
1098
1098
  declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
1099
1099
  conversation?: string | null | undefined;
1100
1100
  include?: ("web_search_call.results" | "file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
@@ -1111,6 +1111,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1111
1111
  } | undefined;
1112
1112
  promptCacheRetention?: "in_memory" | "24h" | null | undefined;
1113
1113
  reasoningEffort?: string | null | undefined;
1114
+ reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1114
1115
  reasoningMode?: "standard" | "pro" | undefined;
1115
1116
  reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1116
1117
  reasoningSummary?: string | null | undefined;
package/dist/index.js CHANGED
@@ -59,14 +59,17 @@ function getOpenAILanguageModelCapabilities(modelId) {
59
59
  const gptVersion = getGptVersion(modelId);
60
60
  const isGptChatModel = (gptVersion == null ? void 0 : gptVersion.minor) == null && ((_b = (_a2 = gptVersion == null ? void 0 : gptVersion.variant) == null ? void 0 : _a2.startsWith("chat")) != null ? _b : false);
61
61
  const isGptNanoModel = (_d = (_c = gptVersion == null ? void 0 : gptVersion.variant) == null ? void 0 : _c.startsWith("nano")) != null ? _d : false;
62
+ const isGpt6OrLaterModel = gptVersion != null && gptVersion.major >= 6;
62
63
  const supportsFlexProcessing = oSeriesVersion != null && oSeriesVersion >= 3 || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
63
64
  const supportsPriorityProcessing = modelId.startsWith("gpt-4") || gptVersion != null && gptVersion.major >= 5 && !isGptNanoModel && !isGptChatModel || oSeriesVersion != null && oSeriesVersion >= 3;
64
65
  const isReasoningModel = oSeriesVersion != null || gptVersion != null && gptVersion.major >= 5 && !isGptChatModel;
65
- const supportsNonReasoningParameters = gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && ((_e = gptVersion.minor) != null ? _e : 0) >= 1);
66
+ const supportsNonReasoningParameters = !isGpt6OrLaterModel && gptVersion != null && (gptVersion.major > 5 || gptVersion.major === 5 && ((_e = gptVersion.minor) != null ? _e : 0) >= 1);
66
67
  const systemMessageMode = isReasoningModel ? "developer" : "system";
67
68
  return {
68
69
  supportsFlexProcessing,
69
70
  supportsPriorityProcessing,
71
+ supportsConfigurationUpdate: isGpt6OrLaterModel,
72
+ supportedReasoningEfforts: isGpt6OrLaterModel ? ["low", "medium", "high", "xhigh", "max"] : void 0,
70
73
  isReasoningModel,
71
74
  systemMessageMode,
72
75
  supportsNonReasoningParameters
@@ -740,6 +743,7 @@ var openaiLanguageModelChatOptions = (0, import_provider_utils4.lazySchema)(
740
743
  user: import_v43.z.string().optional(),
741
744
  /**
742
745
  * Reasoning effort for reasoning models. Defaults to `medium`.
746
+ * GPT-6 and later models support 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
743
747
  */
744
748
  reasoningEffort: import_v43.z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
745
749
  /**
@@ -936,6 +940,17 @@ var OpenAIChatLanguageModel = class {
936
940
  })) != null ? _a2 : {};
937
941
  const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);
938
942
  const isReasoningModel = (_b = openaiOptions.forceReasoning) != null ? _b : modelCapabilities.isReasoningModel;
943
+ let resolvedReasoningEffort = openaiOptions.reasoningEffort;
944
+ if (resolvedReasoningEffort != null && modelCapabilities.supportedReasoningEfforts != null && !modelCapabilities.supportedReasoningEfforts.includes(
945
+ resolvedReasoningEffort
946
+ )) {
947
+ warnings.push({
948
+ type: "unsupported",
949
+ feature: "reasoningEffort",
950
+ details: `${this.modelId} only supports the following reasoning efforts: ${modelCapabilities.supportedReasoningEfforts.join(", ")}`
951
+ });
952
+ resolvedReasoningEffort = void 0;
953
+ }
939
954
  if (topK != null) {
940
955
  warnings.push({ type: "unsupported", feature: "topK" });
941
956
  }
@@ -980,7 +995,7 @@ var OpenAIChatLanguageModel = class {
980
995
  store: openaiOptions.store,
981
996
  metadata: openaiOptions.metadata,
982
997
  prediction: openaiOptions.prediction,
983
- reasoning_effort: openaiOptions.reasoningEffort,
998
+ reasoning_effort: resolvedReasoningEffort,
984
999
  service_tier: openaiOptions.serviceTier,
985
1000
  prompt_cache_key: openaiOptions.promptCacheKey,
986
1001
  prompt_cache_options: openaiOptions.promptCacheOptions,
@@ -989,6 +1004,14 @@ var OpenAIChatLanguageModel = class {
989
1004
  // messages:
990
1005
  messages
991
1006
  };
1007
+ if (modelCapabilities.supportedReasoningEfforts != null && baseArgs.prompt_cache_retention != null) {
1008
+ baseArgs.prompt_cache_retention = void 0;
1009
+ warnings.push({
1010
+ type: "unsupported",
1011
+ feature: "promptCacheRetention",
1012
+ details: "promptCacheRetention is not supported by GPT-6 and later models; use promptCacheOptions instead"
1013
+ });
1014
+ }
992
1015
  if (isReasoningModel) {
993
1016
  if (openaiOptions.reasoningEffort !== "none" || !modelCapabilities.supportsNonReasoningParameters) {
994
1017
  if (baseArgs.temperature != null) {
@@ -5000,7 +5023,8 @@ var openaiResponsesReasoningModelIds = [
5000
5023
  "gpt-5.6",
5001
5024
  "gpt-5.6-luna",
5002
5025
  "gpt-5.6-sol",
5003
- "gpt-5.6-terra"
5026
+ "gpt-5.6-terra",
5027
+ "gpt-6-astra"
5004
5028
  ];
5005
5029
  var openaiResponsesModelIds = [
5006
5030
  "gpt-4.1",
@@ -5119,9 +5143,19 @@ var openaiLanguageModelResponsesOptionsSchema = (0, import_provider_utils29.lazy
5119
5143
  * Reasoning effort for reasoning models. Defaults to `medium`. If you use
5120
5144
  * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
5121
5145
  * GPT-5.6 supports 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
5146
+ * GPT-6 and later models support 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
5122
5147
  * Supported values vary by model.
5123
5148
  */
5124
5149
  reasoningEffort: import_v423.z.string().nullish(),
5150
+ /**
5151
+ * Updates the reasoning effort for GPT-6 and later models starting with this response
5152
+ * without changing the request-level reasoning effort. This preserves the
5153
+ * request prefix for prompt caching.
5154
+ *
5155
+ * Only supported by GPT-6 and later models in standard, single-agent mode. Cannot be
5156
+ * combined with automatic truncation.
5157
+ */
5158
+ reasoningEffortUpdate: import_v423.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
5125
5159
  /**
5126
5160
  * Controls how much model work GPT-5.6 performs before returning a final answer.
5127
5161
  * `standard` is the default. `pro` increases quality, latency, and token usage.
@@ -5719,7 +5753,7 @@ var OpenAIResponsesLanguageModel = class {
5719
5753
  toolChoice,
5720
5754
  responseFormat
5721
5755
  }) {
5722
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
5756
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
5723
5757
  const warnings = [];
5724
5758
  const modelCapabilities = getOpenAILanguageModelCapabilities(this.modelId);
5725
5759
  if (topK != null) {
@@ -5751,6 +5785,17 @@ var OpenAIResponsesLanguageModel = class {
5751
5785
  });
5752
5786
  }
5753
5787
  const isReasoningModel = (_a2 = openaiOptions == null ? void 0 : openaiOptions.forceReasoning) != null ? _a2 : modelCapabilities.isReasoningModel;
5788
+ let resolvedReasoningEffort = openaiOptions == null ? void 0 : openaiOptions.reasoningEffort;
5789
+ if (resolvedReasoningEffort != null && modelCapabilities.supportedReasoningEfforts != null && !modelCapabilities.supportedReasoningEfforts.includes(
5790
+ resolvedReasoningEffort
5791
+ )) {
5792
+ warnings.push({
5793
+ type: "unsupported",
5794
+ feature: "reasoningEffort",
5795
+ details: `${this.modelId} only supports the following reasoning efforts: ${modelCapabilities.supportedReasoningEfforts.join(", ")}`
5796
+ });
5797
+ resolvedReasoningEffort = void 0;
5798
+ }
5754
5799
  if ((openaiOptions == null ? void 0 : openaiOptions.conversation) && (openaiOptions == null ? void 0 : openaiOptions.previousResponseId)) {
5755
5800
  warnings.push({
5756
5801
  type: "unsupported",
@@ -5803,6 +5848,20 @@ var OpenAIResponsesLanguageModel = class {
5803
5848
  customProviderToolNames: customProviderToolNames.size > 0 ? customProviderToolNames : void 0
5804
5849
  });
5805
5850
  warnings.push(...inputWarnings);
5851
+ const reasoningEffortUpdate = openaiOptions == null ? void 0 : openaiOptions.reasoningEffortUpdate;
5852
+ const configurationUpdateIsSupported = reasoningEffortUpdate == null || modelCapabilities.supportsConfigurationUpdate && (openaiOptions == null ? void 0 : openaiOptions.reasoningMode) !== "pro" && (openaiOptions == null ? void 0 : openaiOptions.truncation) !== "auto";
5853
+ if (reasoningEffortUpdate != null && !configurationUpdateIsSupported) {
5854
+ warnings.push({
5855
+ type: "unsupported",
5856
+ feature: "reasoningEffortUpdate",
5857
+ details: !modelCapabilities.supportsConfigurationUpdate ? "reasoningEffortUpdate is only supported by GPT-6 and later models" : "reasoningEffortUpdate requires standard reasoning mode without automatic truncation"
5858
+ });
5859
+ } else if (reasoningEffortUpdate != null) {
5860
+ input.unshift({
5861
+ type: "configuration_update",
5862
+ reasoning: { effort: reasoningEffortUpdate }
5863
+ });
5864
+ }
5806
5865
  const strictJsonSchema = (_f = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _f : true;
5807
5866
  let include = openaiOptions == null ? void 0 : openaiOptions.include;
5808
5867
  function addInclude(key) {
@@ -5876,10 +5935,10 @@ var OpenAIResponsesLanguageModel = class {
5876
5935
  top_logprobs: topLogprobs,
5877
5936
  truncation: openaiOptions == null ? void 0 : openaiOptions.truncation,
5878
5937
  // model-specific settings:
5879
- ...isReasoningModel && ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningMode) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningContext) != null) && {
5938
+ ...isReasoningModel && (resolvedReasoningEffort != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningMode) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningContext) != null) && {
5880
5939
  reasoning: {
5881
- ...(openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null && {
5882
- effort: openaiOptions.reasoningEffort
5940
+ ...resolvedReasoningEffort != null && {
5941
+ effort: resolvedReasoningEffort
5883
5942
  },
5884
5943
  ...(openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null && {
5885
5944
  summary: openaiOptions.reasoningSummary
@@ -5893,6 +5952,14 @@ var OpenAIResponsesLanguageModel = class {
5893
5952
  }
5894
5953
  }
5895
5954
  };
5955
+ if (modelCapabilities.supportsConfigurationUpdate && baseArgs.prompt_cache_retention != null) {
5956
+ baseArgs.prompt_cache_retention = void 0;
5957
+ warnings.push({
5958
+ type: "unsupported",
5959
+ feature: "promptCacheRetention",
5960
+ details: "promptCacheRetention is not supported by GPT-6 and later models; use promptCacheOptions instead"
5961
+ });
5962
+ }
5896
5963
  if (isReasoningModel) {
5897
5964
  if (!((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) === "none" && modelCapabilities.supportsNonReasoningParameters)) {
5898
5965
  if (baseArgs.temperature != null) {
@@ -5912,6 +5979,18 @@ var OpenAIResponsesLanguageModel = class {
5912
5979
  });
5913
5980
  }
5914
5981
  }
5982
+ if (modelCapabilities.supportedReasoningEfforts != null && (baseArgs.top_logprobs != null || ((_i = baseArgs.include) == null ? void 0 : _i.includes("message.output_text.logprobs")))) {
5983
+ baseArgs.top_logprobs = void 0;
5984
+ const filteredInclude = (_j = baseArgs.include) == null ? void 0 : _j.filter(
5985
+ (value) => value !== "message.output_text.logprobs"
5986
+ );
5987
+ baseArgs.include = filteredInclude != null && filteredInclude.length > 0 ? filteredInclude : void 0;
5988
+ warnings.push({
5989
+ type: "unsupported",
5990
+ feature: "logprobs",
5991
+ details: "logprobs is not supported for reasoning models"
5992
+ });
5993
+ }
5915
5994
  } else {
5916
5995
  if ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null) {
5917
5996
  warnings.push({
@@ -5958,9 +6037,9 @@ var OpenAIResponsesLanguageModel = class {
5958
6037
  });
5959
6038
  delete baseArgs.service_tier;
5960
6039
  }
5961
- const shellToolEnvType = (_k = (_j = (_i = tools == null ? void 0 : tools.find(
6040
+ const shellToolEnvType = (_m = (_l = (_k = tools == null ? void 0 : tools.find(
5962
6041
  (tool) => tool.type === "provider" && tool.id === "openai.shell"
5963
- )) == null ? void 0 : _i.args) == null ? void 0 : _j.environment) == null ? void 0 : _k.type;
6042
+ )) == null ? void 0 : _k.args) == null ? void 0 : _l.environment) == null ? void 0 : _m.type;
5964
6043
  const isShellProviderExecuted = shellToolEnvType === "containerAuto" || shellToolEnvType === "containerReference";
5965
6044
  return {
5966
6045
  webSearchToolName,
@@ -7961,7 +8040,7 @@ var OpenAITranscriptionModel = class {
7961
8040
  };
7962
8041
 
7963
8042
  // src/version.ts
7964
- var VERSION = true ? "3.0.107" : "0.0.0-test";
8043
+ var VERSION = true ? "3.0.109" : "0.0.0-test";
7965
8044
 
7966
8045
  // src/openai-provider.ts
7967
8046
  function createOpenAI(options = {}) {