Skip to content

webui: apply webui_settings on first load#18223

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

webui: apply webui_settings on first load#18223
allozaur merged 2 commits intoggml-org:masterfrom
ServeurpersoCom:webui/apply-settings-on-first-load

Conversation

@ServeurpersoCom
Copy link
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
10 checks passed
@jbone1313
Copy link

@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
Copy link
Contributor Author

ServeurpersoCom commented Dec 24, 2025

@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

  • 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
Copy link
Contributor Author

ServeurpersoCom commented Dec 24, 2025

  • 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
Copy link

jbone1313 commented Dec 24, 2025

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
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

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
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
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

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!

Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 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
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
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