Skip to content

server: --reasoning-effort-allow/-fallback and --reasoning-max-tokens-floor - #321

Open
professorpalmer wants to merge 1 commit into
PrismML-Eng:prismfrom
professorpalmer:claude/server-reasoning-flags
Open

professorpalmer wants to merge 1 commit into
PrismML-Eng:prismfrom
professorpalmer:claude/server-reasoning-flags

Conversation

@professorpalmer

Copy link
Copy Markdown

One of the five pieces of #285, split per bri-prism's request on #317. Single commit on current prism (eaecb50c7), applies without conflicts. Server only, both flags off by default.

What it does

  • --reasoning-effort-allow LIST / --reasoning-effort-fallback WORD: Bonsai 2's chat template raises on reasoning_effort: "high", which Cline, Kilo Code and Open WebUI send by default, so every request from those apps was an HTTP 500. An effort word outside the allow list becomes the fallback instead.
  • --reasoning-max-tokens-floor N: with thinking on, a client max_tokens below the floor is raised to it. App defaults of 256-4096 output tokens (quickstart snippets, SillyTavern, AnythingLLM, Continue) otherwise end a thinking model mid-thought with no answer.

Receipts (HumanEval 164, tests executed, the server's own sampling, same 262k/q8_0 serve)

  • reasoning_effort: "high" with a 256-token cap: 160/164 with the flags, 0/20 (HTTP 500) without.
  • A 4096-token cap: 157/164 with the floor, 148/164 without.
  • Medium effort, no cap: 161/164 (Killy's best published cell on PQ2_0: 160-161); thinking off: 138.

Samples and summaries: https://github.com/professorpalmer/bonsai-ada-surgery/tree/main/artifacts/eval/killy_20260927

…-floor

--reasoning-effort-allow LIST: reasoning_effort values passed to the chat template; any other value (from
the request's reasoning_effort or chat_template_kwargs) becomes --reasoning-effort-fallback instead of
reaching a template that raises on it. Bonsai 2's template accepts xhigh/medium/low and raises on "high",
which Cline, Kilo and Open WebUI send: every request failed with HTTP 500.

--reasoning-max-tokens-floor N: with thinking on, a client max_tokens below N is raised to N. A thinking
model spends its first thousands of tokens inside the thinking block; 256-4096 token app caps (PrismML's
quickstart, SillyTavern, AnythingLLM, Continue) end the request there with no answer. --reasoning-budget
still bounds the thinking. Both are off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a9c0710)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant