@ai-sdk/openai 3.0.48 → 3.0.50
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 +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/responses/convert-to-openai-responses-input.ts +12 -0
- package/src/responses/openai-responses-api.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/openai",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.50",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,15 +37,15 @@
|
|
|
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.22"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "20.17.24",
|
|
44
44
|
"tsup": "^8",
|
|
45
45
|
"typescript": "5.8.3",
|
|
46
46
|
"zod": "3.25.76",
|
|
47
|
-
"@
|
|
48
|
-
"@ai-
|
|
47
|
+
"@ai-sdk/test-server": "1.0.3",
|
|
48
|
+
"@vercel/ai-tsconfig": "0.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"zod": "^3.25.76 || ^4.1.8"
|
|
@@ -709,6 +709,11 @@ export async function convertToOpenAIResponsesInput({
|
|
|
709
709
|
filename: item.filename ?? 'data',
|
|
710
710
|
file_data: `data:${item.mediaType};base64,${item.data}`,
|
|
711
711
|
};
|
|
712
|
+
case 'file-url':
|
|
713
|
+
return {
|
|
714
|
+
type: 'input_file' as const,
|
|
715
|
+
file_url: item.url,
|
|
716
|
+
};
|
|
712
717
|
default:
|
|
713
718
|
warnings.push({
|
|
714
719
|
type: 'other',
|
|
@@ -773,6 +778,13 @@ export async function convertToOpenAIResponsesInput({
|
|
|
773
778
|
};
|
|
774
779
|
}
|
|
775
780
|
|
|
781
|
+
case 'file-url': {
|
|
782
|
+
return {
|
|
783
|
+
type: 'input_file' as const,
|
|
784
|
+
file_url: item.url,
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
|
|
776
788
|
default: {
|
|
777
789
|
warnings.push({
|
|
778
790
|
type: 'other',
|
|
@@ -106,6 +106,7 @@ export type OpenAIResponsesFunctionCallOutput = {
|
|
|
106
106
|
| { type: 'input_text'; text: string }
|
|
107
107
|
| { type: 'input_image'; image_url: string }
|
|
108
108
|
| { type: 'input_file'; filename: string; file_data: string }
|
|
109
|
+
| { type: 'input_file'; file_url: string }
|
|
109
110
|
>;
|
|
110
111
|
};
|
|
111
112
|
|