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/dist/daemon/index.js +64302 -56398
- package/dist/index.js +159 -159
- package/package.json +1 -1
- package/src/daemon/http/index.ts +3 -8
package/package.json
CHANGED
package/src/daemon/http/index.ts
CHANGED
|
@@ -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
|
-
//
|
|
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
|
-
|
|
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
|
|