Files
LocalAI/docs/content
pos-ei-don 073adc50c9 feat(sglang): map reasoning_effort to per-level thinking budgets
The Go side already forwards the request's effort as
Metadata["reasoning_effort"], but the sglang backend only read
enable_thinking: every level got the same model-level thinking_budget,
so low/medium/high produced identical reasoning.

- New model option `effort_budgets:low=…;medium=…;high=…` picks the
  budget of the request's level; unlisted levels and requests without an
  effort keep `thinking_budget`. Parsing reuses _parse_thinking_budget.
- A level listed in effort_budgets turns reasoning on for that request,
  so levels the Go side does not know cannot silently disable it.
- ApplyReasoningEffort now treats `xhigh` and `max` as thinking levels.
  Before, they left DisableReasoning unset, so with a model default of
  "off" asking for more reasoning produced none.

Signed-off-by: pos-ei-don <1822533+pos-ei-don@users.noreply.github.com>
(cherry picked from commit 879c686ab1)
2026-10-25 08:50:08 +00:00
..