@ai-sdk/openai 3.0.42 → 3.0.44
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 +13 -0
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +12 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/responses/convert-to-openai-responses-input.ts +24 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/openai",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.44",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ai-sdk/provider": "3.0.8",
|
|
40
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
40
|
+
"@ai-sdk/provider-utils": "4.0.20"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "20.17.24",
|
|
@@ -65,7 +65,7 @@ export async function convertToOpenAIResponsesInput({
|
|
|
65
65
|
input: OpenAIResponsesInput;
|
|
66
66
|
warnings: Array<SharedV3Warning>;
|
|
67
67
|
}> {
|
|
68
|
-
|
|
68
|
+
let input: OpenAIResponsesInput = [];
|
|
69
69
|
const warnings: Array<SharedV3Warning> = [];
|
|
70
70
|
const processedApprovalIds = new Set<string>();
|
|
71
71
|
|
|
@@ -722,6 +722,29 @@ export async function convertToOpenAIResponsesInput({
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
+
// when store is false, remove reasoning parts without encrypted content
|
|
726
|
+
if (
|
|
727
|
+
!store &&
|
|
728
|
+
input.some(
|
|
729
|
+
item =>
|
|
730
|
+
'type' in item &&
|
|
731
|
+
item.type === 'reasoning' &&
|
|
732
|
+
item.encrypted_content == null,
|
|
733
|
+
)
|
|
734
|
+
) {
|
|
735
|
+
warnings.push({
|
|
736
|
+
type: 'other',
|
|
737
|
+
message:
|
|
738
|
+
'Reasoning parts without encrypted content are not supported when store is false. Skipping reasoning parts.',
|
|
739
|
+
});
|
|
740
|
+
input = input.filter(
|
|
741
|
+
item =>
|
|
742
|
+
!('type' in item) ||
|
|
743
|
+
item.type !== 'reasoning' ||
|
|
744
|
+
item.encrypted_content != null,
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
|
|
725
748
|
return { input, warnings };
|
|
726
749
|
}
|
|
727
750
|
|