190proof 1.0.112 → 1.0.113

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
@@ -1227,9 +1227,13 @@ function prepareOpenAICompatMessages(messages) {
1227
1227
  }
1228
1228
  continue;
1229
1229
  }
1230
+ const fileRefs = (message.files || []).filter((file) => file.url).map(
1231
+ (file) => ALLOWED_IMAGE_MIME_TYPES.includes(file.mimeType) ? `Image (${file.url})` : `File (${file.url})`
1232
+ );
1233
+ const content = [normalizeMessageContent(message.content), ...fileRefs].filter(Boolean).join("\n");
1230
1234
  const outMessage = {
1231
1235
  role: message.role,
1232
- content: normalizeMessageContent(message.content)
1236
+ content
1233
1237
  };
1234
1238
  if ((_a = message.functionCalls) == null ? void 0 : _a.length) {
1235
1239
  outMessage.tool_calls = message.functionCalls.map((fc, i) => {
@@ -1243,7 +1247,7 @@ function prepareOpenAICompatMessages(messages) {
1243
1247
  }
1244
1248
  };
1245
1249
  });
1246
- if (!message.content)
1250
+ if (!content)
1247
1251
  outMessage.content = null;
1248
1252
  }
1249
1253
  if (message.reasoning)