Skip to content

webui: apply webui_settings on first load - #18223

Merged
allozaur merged 2 commits into
ggml-org:masterfrom
ServeurpersoCom:webui/apply-settings-on-first-load
Dec 23, 2025
Merged

allozaur merged 2 commits into
ggml-org:masterfrom
ServeurpersoCom:webui/apply-settings-on-first-load

Conversation

@ServeurpersoCom

Copy link
Copy Markdown
Contributor

Make sure to read the contributing guidelines before submitting a PR

The webui_settings from /props were not applied on initial load when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params, works for both single-model and router modes

Close #18185 (Follow-up #18028 #17940)

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes
@allozaur
allozaur merged commit 5b6c9bc into ggml-org:master Dec 23, 2025
@jbone1313

Copy link
Copy Markdown

@ServeurpersoCom this seems to be mostly working, but the below settings do not change regardless of what is set in the JSON file. I verified most of other ones do.

systemMessage
showSystemMessage

@ServeurpersoCom

ServeurpersoCom commented Dec 24, 2025 •

Copy link
Copy Markdown
Contributor Author

@ServeurpersoCom this seems to be mostly working, but the below settings do not change regardless of what is set in the JSON file. I verified most of other ones do.

systemMessage showSystemMessage

Absolutely! Not all the parameters are in the original PR -> #18028
This one just repair the first load, now that the pattern works, we can improve it to add some parameters!

Added 14 WebUI settings to 'SYNCABLE_PARAMETERS':

    pasteLongTextToFileLen
    pdfAsImage
    showThoughtInProgress
    showToolCalls
    disableReasoningFormat
    keepStatsVisible
    showMessageStats
    askForTitleConfirmation
    disableAutoScroll
    renderUserContentAsMarkdown
    autoMicOnEmpty
    pyInterpreterEnabled
    enableContinueGeneration
    showSystemMessage

Feel free to tell me what's missing (Here or new issue please, but systemMessage showSystemMessage added to my TODO); I'll check what it implies in terms of the code and add them.

@jbone1313

Copy link
Copy Markdown
  • showSystemMessage is in the list you posted, yet it is not working. That might mean there is something else going on.
  • RE "Feel free to tell me what's missing": is it easy enough for you to just look at the list in this file and implement them? That is what I did to get the whole list to create my config file.

PS: Thank you for working on this awesome tool!

@ServeurpersoCom

ServeurpersoCom commented Dec 24, 2025 •

Copy link
Copy Markdown
Contributor Author
  • showSystemMessage is in the list you posted, yet it is not working. That might mean there is something else going on.

    • RE "Feel free to tell me what's missing": is it easy enough for you to just look at the list in this file and implement them? That is what I did to get the whole list to create my config file.

PS: Thank you for working on this awesome tool!

It's true that we currently have two configuration options:

  • The .ini file for presets to the server by models; this is more mature.

  • And also the JSON file passed to the frontend to define default values.

Also, the frontend no longer sends the default sampling parameters, but it will do so if overridden by the user.

Currently, the JSON file is incomplete, and can have some issues, but it should only be used for pure-UI preferences outside of the API (like sampling), which the backend can already handle per-models!

@jbone1313

jbone1313 commented Dec 24, 2025 •

Copy link
Copy Markdown

It's true that we currently have two configuration options
it [JSON file] should only be used for visual preferences outside of the API (like sampling)

Yep, I am using both: ini for models and the JSON file for the web UI non-sampler defaults. I also set the sampler values to "" in the JSON file so that they are set to the default in the UI and then allow my model ini config to work. (I am watching #18226 and will test it when it's released.)

Also, the frontend no longer sends the default sampling parameters, but it will do so if overridden by the user.

Yep, I saw that. It seems to work well.

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

I also set the sampler values to "" in the JSON file so that they are set to the default in the UI and then allow my model ini config to work. (I am watching #18226 and will test it when it's released.)

Oh right, I remember now! My PR added UI settings to SYNCABLE_PARAMETERS and added the webuiSettings code path. The sampling params were already in SYNCABLE_PARAMETERS, so now they can be set via --webui-config too!

@jbone1313

Copy link
Copy Markdown

Oh right, I remember now! My PR added UI settings to SYNCABLE_PARAMETERS and added the webuiSettings code path. The sampling params were already in SYNCABLE_PARAMETERS, so now they can be set via --webui-config too!

Cool! Is it easy enough for you to just look at the list in this file and implement any of the ones that are still missing (like e.g. showSystemMessage)? Let me know if you need more info or testing from me.

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

Cool! Is it easy enough for you to just look at the list in this file and implement any of the ones that are still missing (like e.g. showSystemMessage)? Let me know if you need more info or testing from me.

Yes, all things considered, it's best to put everything in and let the user do what they want, especially if it doesn't pose a security problem (backend, more trusted -> frontend).

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

Cool! Is it easy enough for you to just look at the list in this file and implement any of the ones that are still missing (like e.g. showSystemMessage)? Let me know if you need more info or testing from me.

Yes, all things considered, it's best to put everything in and let the user do what they want, especially if it doesn't pose a security problem (backend, more trusted -> frontend).

You can try master + #18226 :) everything is customizable via --webui-config-file.

The JSON parameters will be:

  1. Loaded on all new browsers (first visit)
  2. Customizable per browser and stored in localStorage
  3. Resettable via "Reset to default" button to restore server defaults
{
  "apiKey": "",
  "systemMessage": "",
  "showSystemMessage": true,
  "theme": "system",
  "pasteLongTextToFileLen": 2500,
  "copyTextAttachmentsAsPlainText": false,
  "pdfAsImage": false,
  "showThoughtInProgress": false,
  "showToolCalls": false,
  "disableReasoningFormat": false,
  "alwaysShowSidebarOnDesktop": false,
  "autoShowSidebarOnNewChat": true,
  "keepStatsVisible": false,
  "showMessageStats": true,
  "askForTitleConfirmation": false,
  "disableAutoScroll": false,
  "renderUserContentAsMarkdown": false,
  "autoMicOnEmpty": false,
  "custom": "",
  "pyInterpreterEnabled": false,
  "enableContinueGeneration": false
}

@jbone1313

Copy link
Copy Markdown

You can try master + #18226 :) everything is customizable via --webui-config-file.

I am not equipped to test outside of releases. I will take it for a spin as soon as it makes it into a release. Thanks!

blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
@jbone1313

Copy link
Copy Markdown

@allozaur, @ServeurpersoCom

This does not appear to be working in a build I pulled a few days ago. Let me know if you want me to create a bug.

Repro steps:

  1. Setup a JSON file called "webui-defaults.json" containing some settings, e.g. alwaysShowSidebarOnDesktop.
  2. Run llama-server.exe with --webui-config-file set to webui-defaults.json.
  3. Clear browser cache and/or reset WebUI (the issue happens in both cases).
  4. Run the WebUI.
  5. Inspect the settings.

Expected results: The settings in webui-defaults.json are applied.
Actual results: The settings in webui-defaults.json are not applied.

@allozaur

Copy link
Copy Markdown
Contributor

@ServeurpersoCom please re-check this

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

I check it (default on new browser)

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

@allozaur, @ServeurpersoCom

This does not appear to be working in a build I pulled a few days ago. Let me know if you want me to create a bug.

Repro steps:

1. Setup a JSON file called "webui-defaults.json" containing some settings, e.g. alwaysShowSidebarOnDesktop.

2. Run llama-server.exe with --webui-config-file set to webui-defaults.json.

3. Clear browser cache and/or reset WebUI (the issue happens in both cases).

4. Run the WebUI.

5. Inspect the settings.

Expected results: The settings in webui-defaults.json are applied. Actual results: The settings in webui-defaults.json are not applied.

Hello,
Do you have that Monday commit in your version?
Can you give me your webui-defaults.json file ?

commit c44a932
Author: Pascal [email protected]
Date: Mon Mar 23 11:25:35 2026 +0100

webui: fix --webui-config-file settings not applied on load (#20823)

* webui: fix --webui-config-file settings not applied on load

* chore: update webui build output

@jbone1313

Copy link
Copy Markdown

@ServeurpersoCom it is working now in b8533. Thanks!

@ServeurpersoCom

Copy link
Copy Markdown
Contributor Author

@ServeurpersoCom it is working now in b8533. Thanks!

Thanks for the feedback!

Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
MrLordCat referenced this pull request in MrLordCat/llama.cpp-rdna-lab Jul 16, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
* webui: apply webui_settings on first load

The webui_settings from /props were not applied on initial load
when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params,
works for both single-model and router modes

* chore: update webui build output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: WebUI, first application of default settings (JSON)

3 participants