Feature Request: WebUI add reasoning effort level on a per-message basis
Prerequisites
- [x] I am running the latest code. Mention the version if possible as well.
- [x] I carefully followed the README.md.
- [x] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
- [x] I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description
I would like to propose a feature enhancement for our WebUI: the ability to dynamically change a model's reasoning effort level on a per-message basis at runtime.
Currently, for models like GPT OSS that support it, we can pass a reasoning_effort parameter (e.g., low, medium, high) via kwargs or directly in the API request.
Proposed Solution: Add a dedicated button or dropdown selector within the message input pane. This would allow users to select the reasoning effort level (e.g., Low, Medium, High, Off, On) for each new message they send, without needing to alter the overall session configuration.
Extended Use Case & Models: This functionality would be highly valuable for other models that support similar runtime parameters, such as: Qwen3 ,NVIDIA Nemotron toggling reasoning.
This feature would provide greater flexibility and control during conversations, enabling users to optimize for speed or depth as needed for each query.
Motivation
It is already implemented in Cherry Studio and some other clients.
Possible Implementation
No response
This is planned, but requires https://github.com/ggml-org/llama.cpp/pull/17750 before it's done. Unless you mean only setting it for models that are trained with support for a reasoning_effort switch - but then I don't think any GGML-compatible model outside of GPT-OSS natively supports it.
If it is planned then it is great. I thought other clients have it and it will be good idea to float, if it is feasible to implement in llama.cpp frontend.
If it is planned then it is great. I thought other clients have it and it will be good idea to float, if it is feasible to implement in llama.cpp frontend.
It's a bit tricky because not every model supports levels like low/medium/high. For some it's an on/off toggle, for others it's a token budget.
This feature would require some way to query the backend for model reasoning capabilities. Something we're currently exploring as well. It's a good idea, but an adequate solution requires a bit more plumbing within llama.cpp.
I appreciate you guys considering it. My idea was to bring it to attention, as I believe it will be useful for llama.cpp users.
In other thread someone mentioned it is holiday season for some. Enjoy your holidays if it is so, with time I am sure you guys will device whatever is deemed best.
Even reasoning on/off will be good.
There are a lot of models with toggleable reasoning (Qwen, GLM, DeekSeek, etc). It would be very useful to have a reasoning toggle in the WebUI.
Related: #20001
This would definitely be awesome, with the current thinking budget feature seems like we are getting closer
https://github.com/ggml-org/llama.cpp/issues/18405 https://github.com/ggml-org/llama.cpp/pull/21141
Lightweightness is imo an important argument, cause this makes model reloading unnecessary (which takes time):
E.g. Gemma 4 llama.cpp server start parameter for configuring reasoning:
- Disable reasoning:
--reasoning off - Enable reasoning:
--chat-template-kwargs '{"enable_thinking":true}'
Each start takes time to load up the model. But switching the reasoning from disabled to enabled or vice versa doesn't need the model to be completely reloaded? So a switch would make that switching much more lightweight (without reloading the model).
It's fairly easy to do that already by just changing the api args in your chat UI, not convenient but doable without reloading model.
To me the reasoning effort is helpful here, would be great to be able to toggle how long the model spends thinking in llama.cpp webui based on my question.
@NickM-27 You mean by Settings>Developer>Custom JSON in some way? And which models, you like, do support different thinking modes (other than only on off?)?
Btw. --reasoning off seems to be actually provided by the merged prerequisite @pwilkin somewhat named earlier (which seems to be implemented now), being https://github.com/ggml-org/llama.cpp/pull/20297 . And it might actually use the kwargs mechanism to implement its functionality. Just saying for completeness.
And for connecting the dots: That is a (or the?) other relevant somewhat similar feature request issue https://github.com/ggml-org/llama.cpp/issues/20001 .
yes, quite literally:
{
"id_slot": 0,
"chat_template_kwargs": {
"enable_thinking": true
}
}
for the custom JSON
And which models, you like, do support different thinking modes (other than only on off?)?
Well, GPT-OSS for example has low / medium / high directly built in. But also with the --reasoning-budget already existing in llama.cpp it would be possible to implement this for any hybrid model where low / medium / high can be mapped to certain token levels of --reasoning-budget dynamically (certainly more complicated that I made it just sound)
@NickM-27 That works, nice.
About the models: All the following models do and only support binary thinking switching (which are probably for many people at the moment the most interesting models?), source ai search:
- Gemma 4 26B A4B
- Gemma 4 31B
- Qwen3.5-9B
- Qwen3.5-35B-A3B
- Qwen3.6-35B-A3B
- Qwen3.6-27B
Maybe interesting for developing llama.cpp:
I noticed that
{
"id_slot": 0,
"reasoning": "on"
}
seems not to work? Isn't the reasoning parameter there to simplify and abstract the reasoning configuration from concrete model details? Then it would be good to have that in the per request header as well? And that could be used then by the webui to implement its switching functionality?
Also, reasoning is not an an false/true parameter. So It would be nice to use that for backwards compatible expanding the arguments, conrete from {off, on} to for example {off, low, medium, high, on}. But you wrote something about --reasoning-effort maybe that's more appropriate. That is to decide for other people, who probably also have more context.
All the following models do and only support binary thinking switching (which are probably for many people at the moment the most interesting models?)?:
that's not really correct, what I was talking about above is a llama.cpp feature https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md
seems not to work?
Yeah, that's a config, it would need to be exposed via API which I don't believe it is currently. custom kwargs are though
Is it possible to embed model thinking capabilities in GGUF metadata and expose model thinking capabilities through /v1/models endpoint, like #22952 introduced modalities?
That will make it easier for clients to implement such functionality.