@ai-sdk/openai 4.0.72 → 4.0.73

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.
@@ -192,9 +192,9 @@ The following provider options are available:
192
192
  Reasoning effort for reasoning models. Defaults to `medium`. If you use `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
193
193
 
194
194
  <Note>
195
- Supported reasoning efforts vary by model. GPT-5.6 supports `'none'`, `'low'`,
196
- `'medium'`, `'high'`, `'xhigh'`, and `'max'`. GPT-6 and later models support
197
- `'low'`, `'medium'`, `'high'`, `'xhigh'`, and `'max'`.
195
+ Supported reasoning efforts vary by model. GPT-5.6 and GPT-6 support `'none'`,
196
+ `'low'`, `'medium'`, `'high'`, `'xhigh'`, and `'max'`. GPT-6 Astra does not
197
+ support `'none'`.
198
198
  </Note>
199
199
 
200
200
  <Note type="warning">
@@ -2811,6 +2811,8 @@ The following optional provider options are available for OpenAI completion mode
2811
2811
  | Model | Image Input | Audio Input | Object Generation | Tool Usage |
2812
2812
  | --------------------- | ----------- | ----------- | ----------------- | ---------- |
2813
2813
  | `gpt-6-astra` | <Check /> | <Cross /> | <Check /> | <Check /> |
2814
+ | `gpt-6-luna` | <Check /> | <Cross /> | <Check /> | <Check /> |
2815
+ | `gpt-6-sol` | <Check /> | <Cross /> | <Check /> | <Check /> |
2814
2816
  | `gpt-5.6` | <Check /> | <Cross /> | <Check /> | <Check /> |
2815
2817
  | `gpt-5.6-luna` | <Check /> | <Cross /> | <Check /> | <Check /> |
2816
2818
  | `gpt-5.6-sol` | <Check /> | <Cross /> | <Check /> | <Check /> |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.72",
3
+ "version": "4.0.73",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@ai-sdk/provider": "4.0.17",
39
- "@ai-sdk/provider-utils": "5.0.45"
38
+ "@ai-sdk/provider": "4.0.18",
39
+ "@ai-sdk/provider-utils": "5.0.46"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@ai-sdk/test-server": "2.0.1",
@@ -36,6 +36,11 @@ export const openaiChatResponseSchema = lazySchema(() =>
36
36
  message: z.object({
37
37
  role: z.literal('assistant').nullish(),
38
38
  content: z.string().nullish(),
39
+ audio: z
40
+ .object({
41
+ transcript: z.string().nullish(),
42
+ })
43
+ .nullish(),
39
44
  tool_calls: z
40
45
  .array(
41
46
  z.object({
@@ -71,6 +71,8 @@ export type OpenAIChatModelId =
71
71
  | 'gpt-5.6-sol'
72
72
  | 'gpt-5.6-terra'
73
73
  | 'gpt-6-astra'
74
+ | 'gpt-6-luna'
75
+ | 'gpt-6-sol'
74
76
  | (string & {});
75
77
 
76
78
  export const openaiLanguageModelChatOptions = lazySchema(() =>
@@ -416,7 +416,10 @@ export class OpenAIChatLanguageModel implements LanguageModelV4 {
416
416
  const content: Array<LanguageModelV4Content> = [];
417
417
 
418
418
  // text content:
419
- const text = choice.message.content;
419
+ const text =
420
+ choice.message.content != null && choice.message.content.length > 0
421
+ ? choice.message.content
422
+ : choice.message.audio?.transcript;
420
423
  if (text != null && text.length > 0) {
421
424
  content.push({ type: 'text', text });
422
425
  }
@@ -24,6 +24,8 @@ export function getOpenAILanguageModelCapabilities(
24
24
  const isGptNanoModel = gptVersion?.variant?.startsWith('nano') ?? false;
25
25
  const isGpt6OrLaterModel = gptVersion != null && gptVersion.major >= 6;
26
26
 
27
+ const isGpt6SolOrLuna = modelId === 'gpt-6-sol' || modelId === 'gpt-6-luna';
28
+
27
29
  const supportsFlexProcessing =
28
30
  (oSeriesVersion != null && oSeriesVersion >= 3) ||
29
31
  (gptVersion != null && gptVersion.major >= 5 && !isGptChatModel);
@@ -57,9 +59,11 @@ export function getOpenAILanguageModelCapabilities(
57
59
  supportsPriorityProcessing,
58
60
  supportsConfigurationUpdate: isGpt6OrLaterModel,
59
61
  supportsAsyncToolCalling: isGpt6OrLaterModel,
60
- supportedReasoningEfforts: isGpt6OrLaterModel
61
- ? ['low', 'medium', 'high', 'xhigh', 'max']
62
- : undefined,
62
+ supportedReasoningEfforts: isGpt6SolOrLuna
63
+ ? ['none', 'low', 'medium', 'high', 'xhigh', 'max']
64
+ : isGpt6OrLaterModel
65
+ ? ['low', 'medium', 'high', 'xhigh', 'max']
66
+ : undefined,
63
67
  isReasoningModel,
64
68
  systemMessageMode,
65
69
  supportsNonReasoningParameters,
@@ -58,6 +58,8 @@ export const openaiResponsesReasoningModelIds = [
58
58
  'gpt-5.6-sol',
59
59
  'gpt-5.6-terra',
60
60
  'gpt-6-astra',
61
+ 'gpt-6-luna',
62
+ 'gpt-6-sol',
61
63
  ] as const;
62
64
 
63
65
  export const openaiResponsesModelIds = [
@@ -131,6 +133,8 @@ export type OpenAIResponsesModelId =
131
133
  | 'gpt-5.6-sol'
132
134
  | 'gpt-5.6-terra'
133
135
  | 'gpt-6-astra'
136
+ | 'gpt-6-luna'
137
+ | 'gpt-6-sol'
134
138
  | 'gpt-5-2025-08-07'
135
139
  | 'gpt-5-chat-latest'
136
140
  | 'gpt-5-codex'