@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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 3.0.114
4
+
5
+ ### Patch Changes
6
+
7
+ - e53d917: fix(openai): preserve provider file references in Responses tool results
8
+
3
9
  ## 3.0.113
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3153,7 +3153,7 @@ async function convertFunctionToolResultOutput({
3153
3153
  return convertScalarOutput(JSON.stringify(output.value));
3154
3154
  case "content":
3155
3155
  return output.value.map((item) => {
3156
- var _a3, _b, _c, _d, _e;
3156
+ var _a3, _b, _c, _d, _e, _f, _g;
3157
3157
  const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
3158
3158
  item.providerOptions,
3159
3159
  providerOptionsName
@@ -3188,10 +3188,29 @@ async function convertFunctionToolResultOutput({
3188
3188
  }
3189
3189
  };
3190
3190
  }
3191
+ case "file-id": {
3192
+ return {
3193
+ type: "input_file",
3194
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3195
+ ...promptCacheBreakpoint2 != null && {
3196
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3197
+ }
3198
+ };
3199
+ }
3200
+ case "image-file-id": {
3201
+ return {
3202
+ type: "input_image",
3203
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3204
+ detail: (_f = (_e = item.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.imageDetail,
3205
+ ...promptCacheBreakpoint2 != null && {
3206
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3207
+ }
3208
+ };
3209
+ }
3191
3210
  case "file-data": {
3192
3211
  return {
3193
3212
  type: "input_file",
3194
- filename: (_e = item.filename) != null ? _e : "data",
3213
+ filename: (_g = item.filename) != null ? _g : "data",
3195
3214
  file_data: `data:${item.mediaType};base64,${item.data}`,
3196
3215
  ...promptCacheBreakpoint2 != null && {
3197
3216
  prompt_cache_breakpoint: promptCacheBreakpoint2
@@ -8110,7 +8129,7 @@ var OpenAITranscriptionModel = class {
8110
8129
  };
8111
8130
 
8112
8131
  // src/version.ts
8113
- var VERSION = true ? "3.0.113" : "0.0.0-test";
8132
+ var VERSION = true ? "3.0.114" : "0.0.0-test";
8114
8133
 
8115
8134
  // src/openai-provider.ts
8116
8135
  function createOpenAI(options = {}) {