ui: fix thinking menu never appearing in single-model mode#25637
Open
ServeurpersoCom wants to merge 1 commit into
Open
ui: fix thinking menu never appearing in single-model mode#25637ServeurpersoCom wants to merge 1 commit into
ServeurpersoCom wants to merge 1 commit into
Conversation
In MODEL mode, modelPropsCache is never populated: fetchModelProps call sites are gated on router-only state (isRouterMode checks, routerModels always empty), so supportsThinking always reads an empty chat template once a model is auto-selected. Read serverStore.props.chat_template directly in non-router mode, since the global /props already describes the single loaded model.
Contributor
Author
|
It's a targeted fix, but the broader idea is that we could eventually drop single-model mode entirely and treat it as the N=1 case of router mode, reducing the amount of code paths to maintain. From the UI standpoint at least; whether the backend needs anything beyond very minor adjustments remains to be checked. |
allozaur
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes the thinking menu never showing up when llama-server runs a single model (no router mode).
Previously, the reasoning controls only appeared in router mode: with a single loaded model, the WebUI never detected thinking support from the chat template, so reasoning models like Qwen3 or DeepSeek R1 had no way to toggle thinking from the UI.
The model's chat template is now read from the server's /props directly in single-model mode, so the thinking menu appears whenever the loaded model supports it. No change in router mode.
Additional information
Fixes #25580
Requirements