From 59ae2b24932dbd9695c6abb266c26c29ddb1bb4b Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Tue, 31 Mar 2026 00:13:03 -0700 Subject: [PATCH] Fix: hardcode Claude max_tokens to 128k Co-authored-by: gpt-5.3-codex --- providers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers.js b/providers.js index eb6ee6e..252e869 100644 --- a/providers.js +++ b/providers.js @@ -142,6 +142,7 @@ export async function streamClaude({ apiKey, body, signal, onDelta, isRunning }) const client = new Anthropic({ apiKey }) const online = (body.model ?? '').endsWith(':online') const model = online ? body.model.slice(0, -7) : body.model + const CLAUDE_MAX_TOKENS = 128000 const system = body.messages .filter(m => m.role === 'system') @@ -160,7 +161,7 @@ export async function streamClaude({ apiKey, body, signal, onDelta, isRunning }) return null }).filter(Boolean), })).filter(m => m.content.length), - max_tokens: body.max_tokens || 64000, + max_tokens: CLAUDE_MAX_TOKENS, } if (system) payload.system = system if (Number.isFinite(+body.temperature)) payload.temperature = +body.temperature