@ai-sdk/openai 4.0.10 → 4.0.11

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,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 4.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - b2b1bb9: feat(provider/openai): add GPT-5.6 reasoning and prompt cache controls
8
+
3
9
  ## 4.0.10
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
9
9
  logprobs?: number | boolean | undefined;
10
10
  parallelToolCalls?: boolean | undefined;
11
11
  user?: string | undefined;
12
- reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
12
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
13
13
  maxCompletionTokens?: number | undefined;
14
14
  store?: boolean | undefined;
15
15
  metadata?: Record<string, string> | undefined;
@@ -18,6 +18,10 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
18
18
  strictJsonSchema?: boolean | undefined;
19
19
  textVerbosity?: "low" | "medium" | "high" | undefined;
20
20
  promptCacheKey?: string | undefined;
21
+ promptCacheOptions?: {
22
+ mode?: "explicit" | "implicit" | undefined;
23
+ ttl?: "30m" | undefined;
24
+ } | undefined;
21
25
  promptCacheRetention?: "in_memory" | "24h" | undefined;
22
26
  safetyIdentifier?: string | undefined;
23
27
  systemMessageMode?: "remove" | "system" | "developer" | undefined;
@@ -244,6 +248,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
244
248
  output_tokens: number;
245
249
  input_tokens_details?: {
246
250
  cached_tokens?: number | null | undefined;
251
+ cache_write_tokens?: number | null | undefined;
247
252
  orchestration_input_tokens?: number | null | undefined;
248
253
  orchestration_input_cached_tokens?: number | null | undefined;
249
254
  } | null | undefined;
@@ -255,6 +260,9 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
255
260
  incomplete_details?: {
256
261
  reason: string;
257
262
  } | null | undefined;
263
+ reasoning?: {
264
+ context?: string | null | undefined;
265
+ } | null | undefined;
258
266
  service_tier?: string | null | undefined;
259
267
  };
260
268
  } | {
@@ -273,6 +281,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
273
281
  output_tokens: number;
274
282
  input_tokens_details?: {
275
283
  cached_tokens?: number | null | undefined;
284
+ cache_write_tokens?: number | null | undefined;
276
285
  orchestration_input_tokens?: number | null | undefined;
277
286
  orchestration_input_cached_tokens?: number | null | undefined;
278
287
  } | null | undefined;
@@ -281,6 +290,9 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
281
290
  orchestration_output_tokens?: number | null | undefined;
282
291
  } | null | undefined;
283
292
  } | null | undefined;
293
+ reasoning?: {
294
+ context?: string | null | undefined;
295
+ } | null | undefined;
284
296
  service_tier?: string | null | undefined;
285
297
  };
286
298
  } | {
@@ -1072,8 +1084,14 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1072
1084
  parallelToolCalls?: boolean | null | undefined;
1073
1085
  previousResponseId?: string | null | undefined;
1074
1086
  promptCacheKey?: string | null | undefined;
1087
+ promptCacheOptions?: {
1088
+ mode?: "explicit" | "implicit" | undefined;
1089
+ ttl?: "30m" | undefined;
1090
+ } | undefined;
1075
1091
  promptCacheRetention?: "in_memory" | "24h" | null | undefined;
1076
1092
  reasoningEffort?: string | null | undefined;
1093
+ reasoningMode?: "standard" | "pro" | undefined;
1094
+ reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1077
1095
  reasoningSummary?: string | null | undefined;
1078
1096
  safetyIdentifier?: string | null | undefined;
1079
1097
  serviceTier?: "default" | "auto" | "flex" | "priority" | null | undefined;
@@ -1269,6 +1287,7 @@ type ResponsesProviderMetadata = {
1269
1287
  responseId: string | null | undefined;
1270
1288
  logprobs?: Array<OpenAIResponsesLogprobs>;
1271
1289
  serviceTier?: string;
1290
+ reasoningContext?: string;
1272
1291
  };
1273
1292
  type ResponsesReasoningProviderMetadata = {
1274
1293
  itemId: string;