mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
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>