routstrd 0.4.6 → 0.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "routstrd",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1712,20 +1712,15 @@ export function createDaemonRequestHandler(deps: {
1712
1712
  // limit. Without this, the SDK prices at the provider's worst-case
1713
1713
  // max_completion_cost, which varies widely across providers (2.3× for
1714
1714
  // kimi-k3) and balloons during provider failover. Chat/completions use
1715
- // max_completion_tokens (the OpenAI-standard field; legacy max_tokens is
1716
- // deprecated and rejected by reasoning models); the Responses API uses
1717
- // max_output_tokens.
1715
+ // max_tokens; the OpenAI Responses API uses max_output_tokens.
1718
1716
  if (deps.maxTokens > 0) {
1719
1717
  const isResponsesPath = url.pathname.includes("/responses");
1720
1718
  if (isResponsesPath) {
1721
1719
  if (typeof bodyObj.max_output_tokens !== "number") {
1722
1720
  bodyObj.max_output_tokens = deps.maxTokens;
1723
1721
  }
1724
- } else if (
1725
- typeof bodyObj.max_completion_tokens !== "number" &&
1726
- typeof bodyObj.max_tokens !== "number"
1727
- ) {
1728
- bodyObj.max_completion_tokens = deps.maxTokens;
1722
+ } else if (typeof bodyObj.max_tokens !== "number") {
1723
+ bodyObj.max_tokens = deps.maxTokens;
1729
1724
  }
1730
1725
  }
1731
1726