Add a reasoning-off setting (-1 reasoning budget)
Models like DeepSeek V4 Flash reason by default, and the reasoning budget
setting could only ever add thinking tokens - there was no value that turned
thinking off. A negative budget now sends `reasoning: {effort: "none"}`.
Uses effort:none rather than exclude:true deliberately - exclude still thinks
and still bills, it only hides the trace.
Zero keeps its old meaning (send no `reasoning` field at all) so endpoints that
reject unknown fields, like the default Ollama one, are unaffected. Reusing the
existing int column this way avoids a migration.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeQVy5bEjLhfgWNc27Efet
This commit is contained in:
co-authored by
Claude Opus 5
parent
aed28d9295
commit
d66fd1d6a2
@@ -167,12 +167,15 @@ export default function Settings() {
|
||||
</div>
|
||||
<label className="field">
|
||||
<span className="label">Reasoning budget (tokens)</span>
|
||||
<input type="number" min="0" value={settings.reasoning_max_tokens}
|
||||
onChange={(e) => setField('reasoning_max_tokens', Number(e.target.value))} />
|
||||
<input type="number" min="-1" value={settings.reasoning_max_tokens}
|
||||
onChange={(e) => setField(
|
||||
'reasoning_max_tokens', Math.max(-1, Number(e.target.value)))} />
|
||||
<span className="label" style={{ marginTop: 4 }}>
|
||||
For reasoning models: separate thinking budget on top of max output tokens,
|
||||
and thinking is shown collapsed above each response. 0 = off (nothing extra
|
||||
is sent — keep 0 for endpoints/models without reasoning support).
|
||||
and thinking is shown collapsed above each response. 0 = nothing extra is
|
||||
sent (keep 0 for endpoints without reasoning support, e.g. Ollama).
|
||||
−1 = actively turn reasoning off, for models that think by default
|
||||
(DeepSeek V4 Flash) — saves the thinking tokens rather than just hiding them.
|
||||
</span>
|
||||
</label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user