@zenmux/rosetta-ai 0.14.0 → 0.16.0

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.
@@ -35,7 +35,9 @@ class MessagesToChatCompletionConverter {
35
35
  messages,
36
36
  };
37
37
  if (params.max_tokens !== undefined) {
38
- result.max_tokens = params.max_tokens;
38
+ // Use max_completion_tokens: max_tokens is deprecated and rejected by
39
+ // o-series / reasoning models.
40
+ result.max_completion_tokens = params.max_tokens;
39
41
  }
40
42
  if (params.temperature !== undefined) {
41
43
  result.temperature = params.temperature;
@@ -156,9 +158,11 @@ class MessagesToChatCompletionConverter {
156
158
  prompt_tokens: inputTokens,
157
159
  total_tokens: totalTokens,
158
160
  completion_tokens_details: {
161
+ ...u.completion_tokens_details,
159
162
  reasoning_tokens: reasoningTokens,
160
163
  },
161
164
  prompt_tokens_details: {
165
+ ...u.prompt_tokens_details,
162
166
  cached_tokens: cachedTokens,
163
167
  ...(webSearch > 0 ? { web_search: webSearch } : {}),
164
168
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenmux/rosetta-ai",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Universal translator between AI provider protocols",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",