@zenmux/rosetta-ai 1.0.4 → 1.0.5

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.
@@ -349,13 +349,18 @@ class ResponsesToChatCompletionConverter {
349
349
  }
350
350
  };
351
351
  for (const item of input) {
352
- if ("role" in item && "content" in item && typeof item.content === "string") {
352
+ if ("role" in item && "content" in item && !("type" in item)) {
353
+ // EasyInputMessage: { role, content } with no `type` field.
354
+ // content may be a string or an array of input parts.
353
355
  flushToolCalls();
354
356
  const role = item.role;
355
357
  if (role === "user" || role === "system" || role === "developer" || role === "assistant") {
358
+ const content = typeof item.content === "string"
359
+ ? item.content
360
+ : this.convertInputContent(item.content);
356
361
  messages.push({
357
362
  role,
358
- content: item.content,
363
+ content,
359
364
  });
360
365
  }
361
366
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenmux/rosetta-ai",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Universal translator between AI provider protocols",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",