@ai-sdk/openai 3.0.59 → 3.0.61
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 +12 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -11
- 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 +16 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -10
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +1 -0
- package/package.json +3 -3
- package/src/chat/openai-chat-options.ts +2 -0
- package/src/openai-language-model-capabilities.ts +3 -2
- package/src/responses/convert-to-openai-responses-input.ts +12 -0
- package/src/responses/openai-responses-options.ts +4 -0
package/docs/03-openai.mdx
CHANGED
|
@@ -2180,6 +2180,7 @@ The following optional provider options are available for OpenAI completion mode
|
|
|
2180
2180
|
|
|
2181
2181
|
| Model | Image Input | Audio Input | Object Generation | Tool Usage |
|
|
2182
2182
|
| --------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
|
|
2183
|
+
| `gpt-5.5` | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
2183
2184
|
| `gpt-5.4-pro` | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
2184
2185
|
| `gpt-5.4` | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
2185
2186
|
| `gpt-5.4-mini` | <Check size={18} /> | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/openai",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.61",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ai-sdk/provider": "
|
|
40
|
-
"@ai-sdk/provider
|
|
39
|
+
"@ai-sdk/provider-utils": "4.0.26",
|
|
40
|
+
"@ai-sdk/provider": "3.0.10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "20.17.24",
|
|
@@ -36,12 +36,13 @@ export function getOpenAILanguageModelCapabilities(
|
|
|
36
36
|
(modelId.startsWith('gpt-5') && !modelId.startsWith('gpt-5-chat'));
|
|
37
37
|
|
|
38
38
|
// https://platform.openai.com/docs/guides/latest-model#gpt-5-1-parameter-compatibility
|
|
39
|
-
// GPT-5.1
|
|
39
|
+
// GPT-5.1 and later model families support temperature, topP, logProbs when reasoningEffort is none.
|
|
40
40
|
const supportsNonReasoningParameters =
|
|
41
41
|
modelId.startsWith('gpt-5.1') ||
|
|
42
42
|
modelId.startsWith('gpt-5.2') ||
|
|
43
43
|
modelId.startsWith('gpt-5.3') ||
|
|
44
|
-
modelId.startsWith('gpt-5.4')
|
|
44
|
+
modelId.startsWith('gpt-5.4') ||
|
|
45
|
+
modelId.startsWith('gpt-5.5');
|
|
45
46
|
|
|
46
47
|
const systemMessageMode = isReasoningModel ? 'developer' : 'system';
|
|
47
48
|
|
|
@@ -701,11 +701,17 @@ export async function convertToOpenAIResponsesInput({
|
|
|
701
701
|
return {
|
|
702
702
|
type: 'input_image' as const,
|
|
703
703
|
image_url: `data:${item.mediaType};base64,${item.data}`,
|
|
704
|
+
detail:
|
|
705
|
+
item.providerOptions?.[providerOptionsName]
|
|
706
|
+
?.imageDetail,
|
|
704
707
|
};
|
|
705
708
|
case 'image-url':
|
|
706
709
|
return {
|
|
707
710
|
type: 'input_image' as const,
|
|
708
711
|
image_url: item.url,
|
|
712
|
+
detail:
|
|
713
|
+
item.providerOptions?.[providerOptionsName]
|
|
714
|
+
?.imageDetail,
|
|
709
715
|
};
|
|
710
716
|
case 'file-data':
|
|
711
717
|
return {
|
|
@@ -764,6 +770,9 @@ export async function convertToOpenAIResponsesInput({
|
|
|
764
770
|
return {
|
|
765
771
|
type: 'input_image' as const,
|
|
766
772
|
image_url: `data:${item.mediaType};base64,${item.data}`,
|
|
773
|
+
detail:
|
|
774
|
+
item.providerOptions?.[providerOptionsName]
|
|
775
|
+
?.imageDetail,
|
|
767
776
|
};
|
|
768
777
|
}
|
|
769
778
|
|
|
@@ -771,6 +780,9 @@ export async function convertToOpenAIResponsesInput({
|
|
|
771
780
|
return {
|
|
772
781
|
type: 'input_image' as const,
|
|
773
782
|
image_url: item.url,
|
|
783
|
+
detail:
|
|
784
|
+
item.providerOptions?.[providerOptionsName]
|
|
785
|
+
?.imageDetail,
|
|
774
786
|
};
|
|
775
787
|
}
|
|
776
788
|
|
|
@@ -51,6 +51,8 @@ export const openaiResponsesReasoningModelIds = [
|
|
|
51
51
|
'gpt-5.4-nano-2026-03-17',
|
|
52
52
|
'gpt-5.4-pro',
|
|
53
53
|
'gpt-5.4-pro-2026-03-05',
|
|
54
|
+
'gpt-5.5',
|
|
55
|
+
'gpt-5.5-2026-04-23',
|
|
54
56
|
] as const;
|
|
55
57
|
|
|
56
58
|
export const openaiResponsesModelIds = [
|
|
@@ -117,6 +119,8 @@ export type OpenAIResponsesModelId =
|
|
|
117
119
|
| 'gpt-5.4-nano-2026-03-17'
|
|
118
120
|
| 'gpt-5.4-pro'
|
|
119
121
|
| 'gpt-5.4-pro-2026-03-05'
|
|
122
|
+
| 'gpt-5.5'
|
|
123
|
+
| 'gpt-5.5-2026-04-23'
|
|
120
124
|
| 'gpt-5-2025-08-07'
|
|
121
125
|
| 'gpt-5-chat-latest'
|
|
122
126
|
| 'gpt-5-codex'
|