You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Misc. bug: Web-Frontend overrides sampling parameters from models preset in router mode #18129
$ llama-server --version
[...]
version: 7435 (79dbae034)
built with GNU 14.2.0 for Linux x86_64
Operating systems
Linux
Which llama.cpp modules do you know to be affected?
llama-server
Command line
llama-server --host 127.0.0.1 --port 8000 --jinja --prio 2 --no-mmap --threads -1 -np 3 -fa on --models-preset models.ini
With the following models.ini:
version = 1
[Qwen3-Next-80B-A3A-Thinking-Q4KXL]
model = /path/to/Qwen3-Next-80B-A3B-Thinking-UD-Q4_K_XL.gguf
c = 86016
temp = 0.6
top-p = 0.95
min-p = 0
top-k = 20
cpu-moe = true
presence-penalty = 1.0
[GPT-OSS-20B-F16]
model = /path/to/gpt-oss-20b-F16.gguf
c = 98304
temp = 1.0
top-p = 1.00
min-p = 0
top-k = 100
Problem description & steps to reproduce
I'm running llama-server in router mode with a model preset file containing the recommended sampling parameters for each model. However, the web frontend has different default sampling parameters that are not updated when I switch to a model. While the model's process does use the sampling parameters (as arguments) configured in the preset file, they get overwritten by the web frontend's default sampling parameters in the corresponding /v1/chat/completions request. Clicking "Reset to default" in the web frontend's sampling parameter settings also does not apply the current model's sampling parameters.
The request to /v1/chat/completions sends the following sampling parameters:
Thanks for the issue. Currently we can clean the parameters in the webui. Empty = not sent in the request, following this issue: #16201 / #16330 which works around the problem.
However, this issue is right to exist, because it should be the default behavior for new UI visitors!
Either we clear the sampling parameters in the UI by default, easier and architecturally closer, but webui can override server config with bad remembered user settings
Or we purely and simply ignore them when defined server-side (harder to do, but better behavior for users)
I think it is would be great if a served model works as intended (and optimized) by whoever hosts it, which means that the parameters from the arguments should be the default.
I also think that it is nice that users can experiment with sampling parameters and override them if they explicitly want to do so. However, I think that the sampling parameters should still be tied to the selected model. For example, custom sampling parameter should be cleared again when the model is changed (and maybe also restored again from local storage when the original model whose sampling parameters were explicitly changed is selected again, but that requires a bit more work of course).
Reacted by Pascal, Guillaume Lakano and strawberrymelonpanda
I agree that server presets should be the default. That's the whole point of router mode with model presets.
For the implementation, I think the sanest approach is:
WebUI sampling parameters empty by default, no override, server is the source of truth
User sampling parameter overrides saved per model in browser local storage
This way, server presets work out of the box, and users who explicitly want to experiment with specific models keep their settings without polluting other models. Best of both worlds.
Same behavior / compatibility with API use cases (default server if not specified, but override possible)
Either we clear the sampling parameters in the UI by default, easier and architecturally closer, but webui can override server config with bad remembered user settings
Yes, we discussed this yesterday with @ngxson and having empty fields in the WebUI that just have the preset-based values in the placeholders is probably the way to go here.
This issue has been marked stale but it is very much still present on the current tip of the master branch. From my point of view, it looks like others also have confirmed this, so I guess it could also be re-labeled.
Now we can continue with this one. I think we need to reboot a #18226 or something similar, because it's obsolete with all the refactorings.
I'd love you to lead this one @ServeurpersoCom as u also have a great testing infra for multi-model routing, .ini configurations and more. Let's collaborate closely on this one :)
I'm working on it… We'll rework the part that colors the different overloaded fields later!
One of them works here. This is necessary for all overloaded settings. :
The code for the "Custom" labels was already there and works again for sampling in the PR
Activity
ServeurpersoCom commentedon Dec 18, 2025
Thanks for the issue. Currently we can clean the parameters in the webui. Empty = not sent in the request, following this issue: #16201 / #16330 which works around the problem.
However, this issue is right to exist, because it should be the default behavior for new UI visitors!
rtpt-erikgeiser commentedon Dec 18, 2025
I think it is would be great if a served model works as intended (and optimized) by whoever hosts it, which means that the parameters from the arguments should be the default.
I also think that it is nice that users can experiment with sampling parameters and override them if they explicitly want to do so. However, I think that the sampling parameters should still be tied to the selected model. For example, custom sampling parameter should be cleared again when the model is changed (and maybe also restored again from local storage when the original model whose sampling parameters were explicitly changed is selected again, but that requires a bit more work of course).
ServeurpersoCom commentedon Dec 18, 2025
I agree that server presets should be the default. That's the whole point of router mode with model presets.
For the implementation, I think the sanest approach is:
WebUI sampling parameters empty by default, no override, server is the source of truth
User sampling parameter overrides saved per model in browser local storage
This way, server presets work out of the box, and users who explicitly want to experiment with specific models keep their settings without polluting other models. Best of both worlds.
Same behavior / compatibility with API use cases (default server if not specified, but override possible)
allozaur commentedon Dec 18, 2025
Yes, we discussed this yesterday with @ngxson and having empty fields in the WebUI that just have the preset-based values in the placeholders is probably the way to go here.
ZUIcat commentedon Dec 28, 2025
It looks like #18226 fixes this issue. Once it's merged, I feel like the WebUI will be almost perfect.
rtpt-erikgeiser commentedon Feb 9, 2026
This issue has been marked stale but it is very much still present on the current tip of the master branch. From my point of view, it looks like others also have confirmed this, so I guess it could also be re-labeled.
ServeurpersoCom commentedon Feb 9, 2026
Yes managing default settings takes priority after the MCP client merge (large refactor)
ServeurpersoCom commentedon Mar 11, 2026
Now we can continue with this one. I think we need to reboot a #18226 or something similar, because it's obsolete with all the refactorings.
allozaur commentedon Mar 14, 2026
I'd love you to lead this one @ServeurpersoCom as u also have a great testing infra for multi-model routing,
.iniconfigurations and more. Let's collaborate closely on this one :)ServeurpersoCom commentedon Mar 14, 2026
I'm working on it… We'll rework the part that colors the different overloaded fields later!
One of them works here. This is necessary for all overloaded settings. :

The code for the "Custom" labels was already there and works again for sampling in the PR