@ai-sdk/openai 3.0.112 → 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/dist/index.mjs CHANGED
@@ -3251,7 +3251,7 @@ async function convertFunctionToolResultOutput({
3251
3251
  return convertScalarOutput(JSON.stringify(output.value));
3252
3252
  case "content":
3253
3253
  return output.value.map((item) => {
3254
- var _a3, _b, _c, _d, _e;
3254
+ var _a3, _b, _c, _d, _e, _f, _g;
3255
3255
  const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
3256
3256
  item.providerOptions,
3257
3257
  providerOptionsName
@@ -3286,10 +3286,29 @@ async function convertFunctionToolResultOutput({
3286
3286
  }
3287
3287
  };
3288
3288
  }
3289
+ case "file-id": {
3290
+ return {
3291
+ type: "input_file",
3292
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3293
+ ...promptCacheBreakpoint2 != null && {
3294
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3295
+ }
3296
+ };
3297
+ }
3298
+ case "image-file-id": {
3299
+ return {
3300
+ type: "input_image",
3301
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3302
+ detail: (_f = (_e = item.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.imageDetail,
3303
+ ...promptCacheBreakpoint2 != null && {
3304
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3305
+ }
3306
+ };
3307
+ }
3289
3308
  case "file-data": {
3290
3309
  return {
3291
3310
  type: "input_file",
3292
- filename: (_e = item.filename) != null ? _e : "data",
3311
+ filename: (_g = item.filename) != null ? _g : "data",
3293
3312
  file_data: `data:${item.mediaType};base64,${item.data}`,
3294
3313
  ...promptCacheBreakpoint2 != null && {
3295
3314
  prompt_cache_breakpoint: promptCacheBreakpoint2
@@ -6669,6 +6688,7 @@ var OpenAIResponsesLanguageModel = class {
6669
6688
  break;
6670
6689
  }
6671
6690
  case "apply_patch_call": {
6691
+ hasFunctionCall = true;
6672
6692
  content.push({
6673
6693
  type: "tool-call",
6674
6694
  toolCallId: part.call_id,
@@ -7315,6 +7335,7 @@ var OpenAIResponsesLanguageModel = class {
7315
7335
  toolCall.applyPatch.endEmitted = true;
7316
7336
  }
7317
7337
  if (toolCall && value.item.status === "completed") {
7338
+ hasFunctionCall = true;
7318
7339
  controller.enqueue({
7319
7340
  type: "tool-call",
7320
7341
  toolCallId: toolCall.toolCallId,
@@ -8232,7 +8253,7 @@ var OpenAITranscriptionModel = class {
8232
8253
  };
8233
8254
 
8234
8255
  // src/version.ts
8235
- var VERSION = true ? "3.0.112" : "0.0.0-test";
8256
+ var VERSION = true ? "3.0.114" : "0.0.0-test";
8236
8257
 
8237
8258
  // src/openai-provider.ts
8238
8259
  function createOpenAI(options = {}) {