mirror of
https://github.com/sune-org/us.proxy.sune.chat.git
synced 2026-04-07 02:02:13 +00:00
Feat: Wire up Claude adaptive thinking + effort
Co-authored-by: Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -163,14 +163,13 @@ export async function streamClaude({ apiKey, body, signal, onDelta, isRunning })
|
|||||||
max_tokens: body.max_tokens || 64000,
|
max_tokens: body.max_tokens || 64000,
|
||||||
}
|
}
|
||||||
if (system) payload.system = system
|
if (system) payload.system = system
|
||||||
|
if (Number.isFinite(+body.temperature)) payload.temperature = +body.temperature
|
||||||
|
if (Number.isFinite(+body.top_p)) payload.top_p = +body.top_p
|
||||||
|
|
||||||
const effort = body.reasoning?.effort
|
const effort = body.reasoning?.effort
|
||||||
if (effort && effort !== 'default') {
|
if (effort && effort !== 'default') {
|
||||||
payload.thinking = { type: 'adaptive' }
|
payload.thinking = { type: 'adaptive' }
|
||||||
payload.output_config = { effort }
|
payload.output_config = { effort }
|
||||||
} else {
|
|
||||||
if (Number.isFinite(+body.temperature)) payload.temperature = +body.temperature
|
|
||||||
if (Number.isFinite(+body.top_p)) payload.top_p = +body.top_p
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (online) {
|
if (online) {
|
||||||
|
|||||||
Reference in New Issue
Block a user