Skip to content

ui: build the reasoning menu from the template effort levels - #31273

Merged
ggerganov merged 2 commits into
ggml-org:masterfrom
ServeurpersoCom:ui-reasoning-effort-levels
Oct 28, 2026
Merged

ggerganov merged 2 commits into
ggml-org:masterfrom
ServeurpersoCom:ui-reasoning-effort-levels

Conversation

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Overview

llama-ui's Low/Medium/High/Max menu always mapped to thinking_budget_tokens, so on Qwen3.8 picking Medium kept the xhigh instructions in the prompt and cut the think block at 2048 tokens.

When chat_template_caps reports reasoning_effort_levels, the menu offers Default, Off and those levels, and a pick is sent as reasoning_effort with no budget. A template that reports none, or a server without the field, keeps the current token budget menu. Switching to another model in a conversation resets the effort to Default. In router mode a request to a cold model waits for the load, so the props and their levels are known before the request is built.

Additional information

Needs #31271 for the levels; without it the UI behaves as before.

Tested end to end with Playwright on a router with Qwen3.8 27B and Gemma 4 E4B, and on a single model server: Medium on Qwen3.8 sends reasoning_effort medium, Gemma keeps the budget menu, a cold Qwen3.8 picked and sent right away still sends the level, and a stop during the load sends nothing.

Closes #27455

Requirements

@ServeurpersoCom
ServeurpersoCom requested review from a team, CISC and pwilkin as code owners October 27, 2026 18:49
When the chat template reports effort levels, the menu offers Default,
Off and those levels, and a pick is sent as reasoning_effort. A
template that reports none keeps the token budget menu.

Picking a model other than the one that produced the last answer resets
the conversation effort to Default, and an effort the current menu
lacks resolves to Default.
A router serves the props of a loaded model only, so a request sent to
a cold model was built without its template effort levels and fell
back to a token budget. The request now waits for the model to load,
joining a load already in flight, and a stop during the wait sends
nothing.

Status waiters hold a list per model so a load and the requests that
wait on it each get theirs, and a props request in flight is shared
with a second caller instead of answering null.
@allozaur allozaur added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Oct 28, 2026
@ggerganov
ggerganov merged commit e486a4b into ggml-org:master Oct 28, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. server/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: expose the reasoning effort levels server side and consume them in llama-ui

3 participants