@askalf/dario 5.5.87 → 5.5.88
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/codex-backend.js +11 -0
- package/package.json +1 -1
package/dist/codex-backend.js
CHANGED
|
@@ -434,6 +434,17 @@ export async function forwardToCodex(req, res, body, creds, corsOrigin, security
|
|
|
434
434
|
const upstreamBody = isAnthropic
|
|
435
435
|
? { ...anthropicToResponsesRequest(parsed, model), stream: true }
|
|
436
436
|
: chatCompletionsToResponses(parsed);
|
|
437
|
+
// The ChatGPT Codex backend REJECTS an output cap outright:
|
|
438
|
+
// 400 {"detail":"Unsupported parameter: max_output_tokens"}
|
|
439
|
+
// Both builders set it from the client's max_tokens / max_completion_tokens,
|
|
440
|
+
// so BOTH shapes 400 whenever a client asks for one. It stayed hidden because
|
|
441
|
+
// every smoke test so far happened to omit max_tokens; it then showed up as a
|
|
442
|
+
// 100% failure on the Anthropic path, where the Messages API REQUIRES
|
|
443
|
+
// max_tokens and so always produced it. Stripped here rather than in either
|
|
444
|
+
// translator because it is a property of THIS backend, not of either wire
|
|
445
|
+
// format — the same builders are correct against an API-key Responses
|
|
446
|
+
// endpoint, which does support the parameter.
|
|
447
|
+
delete upstreamBody.max_output_tokens;
|
|
437
448
|
const target = `${CODEX_BACKEND_BASE_URL.replace(/\/$/, '')}/responses`;
|
|
438
449
|
const abort = new AbortController();
|
|
439
450
|
const timeout = setTimeout(() => abort.abort(), upstreamTimeoutMs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.88",
|
|
4
4
|
"description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|