mirror of
https://github.com/sune-org/us.proxy.sune.chat.git
synced 2026-04-07 02:02:13 +00:00
Fix: hardcode Claude max_tokens to 128k
Co-authored-by: gpt-5.3-codex <no-reply@openai.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user