@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.
@@ -3095,7 +3095,7 @@ async function convertFunctionToolResultOutput({
3095
3095
  return convertScalarOutput(JSON.stringify(output.value));
3096
3096
  case "content":
3097
3097
  return output.value.map((item) => {
3098
- var _a3, _b, _c, _d, _e;
3098
+ var _a3, _b, _c, _d, _e, _f, _g;
3099
3099
  const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
3100
3100
  item.providerOptions,
3101
3101
  providerOptionsName
@@ -3130,10 +3130,29 @@ async function convertFunctionToolResultOutput({
3130
3130
  }
3131
3131
  };
3132
3132
  }
3133
+ case "file-id": {
3134
+ return {
3135
+ type: "input_file",
3136
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3137
+ ...promptCacheBreakpoint2 != null && {
3138
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3139
+ }
3140
+ };
3141
+ }
3142
+ case "image-file-id": {
3143
+ return {
3144
+ type: "input_image",
3145
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3146
+ detail: (_f = (_e = item.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.imageDetail,
3147
+ ...promptCacheBreakpoint2 != null && {
3148
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3149
+ }
3150
+ };
3151
+ }
3133
3152
  case "file-data": {
3134
3153
  return {
3135
3154
  type: "input_file",
3136
- filename: (_e = item.filename) != null ? _e : "data",
3155
+ filename: (_g = item.filename) != null ? _g : "data",
3137
3156
  file_data: `data:${item.mediaType};base64,${item.data}`,
3138
3157
  ...promptCacheBreakpoint2 != null && {
3139
3158
  prompt_cache_breakpoint: promptCacheBreakpoint2
@@ -6830,6 +6849,7 @@ var OpenAIResponsesLanguageModel = class {
6830
6849
  break;
6831
6850
  }
6832
6851
  case "apply_patch_call": {
6852
+ hasFunctionCall = true;
6833
6853
  content.push({
6834
6854
  type: "tool-call",
6835
6855
  toolCallId: part.call_id,
@@ -7476,6 +7496,7 @@ var OpenAIResponsesLanguageModel = class {
7476
7496
  toolCall.applyPatch.endEmitted = true;
7477
7497
  }
7478
7498
  if (toolCall && value.item.status === "completed") {
7499
+ hasFunctionCall = true;
7479
7500
  controller.enqueue({
7480
7501
  type: "tool-call",
7481
7502
  toolCallId: toolCall.toolCallId,