@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.
@@ -3140,7 +3140,7 @@ async function convertFunctionToolResultOutput({
3140
3140
  return convertScalarOutput(JSON.stringify(output.value));
3141
3141
  case "content":
3142
3142
  return output.value.map((item) => {
3143
- var _a3, _b, _c, _d, _e;
3143
+ var _a3, _b, _c, _d, _e, _f, _g;
3144
3144
  const promptCacheBreakpoint2 = getPromptCacheBreakpoint2(
3145
3145
  item.providerOptions,
3146
3146
  providerOptionsName
@@ -3175,10 +3175,29 @@ async function convertFunctionToolResultOutput({
3175
3175
  }
3176
3176
  };
3177
3177
  }
3178
+ case "file-id": {
3179
+ return {
3180
+ type: "input_file",
3181
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3182
+ ...promptCacheBreakpoint2 != null && {
3183
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3184
+ }
3185
+ };
3186
+ }
3187
+ case "image-file-id": {
3188
+ return {
3189
+ type: "input_image",
3190
+ file_id: typeof item.fileId === "string" ? item.fileId : item.fileId[providerOptionsName],
3191
+ detail: (_f = (_e = item.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.imageDetail,
3192
+ ...promptCacheBreakpoint2 != null && {
3193
+ prompt_cache_breakpoint: promptCacheBreakpoint2
3194
+ }
3195
+ };
3196
+ }
3178
3197
  case "file-data": {
3179
3198
  return {
3180
3199
  type: "input_file",
3181
- filename: (_e = item.filename) != null ? _e : "data",
3200
+ filename: (_g = item.filename) != null ? _g : "data",
3182
3201
  file_data: `data:${item.mediaType};base64,${item.data}`,
3183
3202
  ...promptCacheBreakpoint2 != null && {
3184
3203
  prompt_cache_breakpoint: promptCacheBreakpoint2
@@ -6911,6 +6930,7 @@ var OpenAIResponsesLanguageModel = class {
6911
6930
  break;
6912
6931
  }
6913
6932
  case "apply_patch_call": {
6933
+ hasFunctionCall = true;
6914
6934
  content.push({
6915
6935
  type: "tool-call",
6916
6936
  toolCallId: part.call_id,
@@ -7557,6 +7577,7 @@ var OpenAIResponsesLanguageModel = class {
7557
7577
  toolCall.applyPatch.endEmitted = true;
7558
7578
  }
7559
7579
  if (toolCall && value.item.status === "completed") {
7580
+ hasFunctionCall = true;
7560
7581
  controller.enqueue({
7561
7582
  type: "tool-call",
7562
7583
  toolCallId: toolCall.toolCallId,