@ai-sdk/openai 3.0.113 → 3.0.114

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "3.0.113",
3
+ "version": "3.0.114",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -44,8 +44,8 @@
44
44
  "tsup": "^8",
45
45
  "typescript": "5.8.3",
46
46
  "zod": "3.25.76",
47
- "@vercel/ai-tsconfig": "0.0.0",
48
- "@ai-sdk/test-server": "1.0.6"
47
+ "@ai-sdk/test-server": "1.0.6",
48
+ "@vercel/ai-tsconfig": "0.0.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^3.25.76 || ^4.1.8"
@@ -122,6 +122,34 @@ async function convertFunctionToolResultOutput({
122
122
  };
123
123
  }
124
124
 
125
+ case 'file-id': {
126
+ return {
127
+ type: 'input_file' as const,
128
+ file_id:
129
+ typeof item.fileId === 'string'
130
+ ? item.fileId
131
+ : item.fileId[providerOptionsName],
132
+ ...(promptCacheBreakpoint != null && {
133
+ prompt_cache_breakpoint: promptCacheBreakpoint,
134
+ }),
135
+ };
136
+ }
137
+
138
+ case 'image-file-id': {
139
+ return {
140
+ type: 'input_image' as const,
141
+ file_id:
142
+ typeof item.fileId === 'string'
143
+ ? item.fileId
144
+ : item.fileId[providerOptionsName],
145
+ detail:
146
+ item.providerOptions?.[providerOptionsName]?.imageDetail,
147
+ ...(promptCacheBreakpoint != null && {
148
+ prompt_cache_breakpoint: promptCacheBreakpoint,
149
+ }),
150
+ };
151
+ }
152
+
125
153
  case 'file-data': {
126
154
  return {
127
155
  type: 'input_file' as const,
@@ -204,6 +204,11 @@ export type OpenAIResponsesFunctionCallOutput = {
204
204
  image_url: string;
205
205
  prompt_cache_breakpoint?: { mode: 'explicit' };
206
206
  }
207
+ | {
208
+ type: 'input_image';
209
+ file_id: string;
210
+ prompt_cache_breakpoint?: { mode: 'explicit' };
211
+ }
207
212
  | {
208
213
  type: 'input_file';
209
214
  filename: string;
@@ -215,6 +220,11 @@ export type OpenAIResponsesFunctionCallOutput = {
215
220
  file_url: string;
216
221
  prompt_cache_breakpoint?: { mode: 'explicit' };
217
222
  }
223
+ | {
224
+ type: 'input_file';
225
+ file_id: string;
226
+ prompt_cache_breakpoint?: { mode: 'explicit' };
227
+ }
218
228
  >;
219
229
  };
220
230