Skip to content

server : (webui) let server send locally-defined default webui settings #14468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

woof-dog
Copy link
Contributor

@woof-dog woof-dog commented Jun 30, 2025

There have been clashes, such as in #14041, with decisions about default llama.cpp client-side webui settings which are currently hardcoded and not adjustable by the llama-server host without modifying source code. Here I add a command-line argument for the default JSON-encoded client-side settings which are served by llama-server and read by the webui frontend only if no settings have been saved to local storage.

Notably this means that I won't have to maintain a fork and recompile the webui frontend code manually to disable particular settings or buggy functionality (such as setting pasteLongTextToFileLen to 0, helping #14041/#14251). Not all settings must be provided. For example,

defaultSettings.json:

{
  "pasteLongTextToFileLen": 0
}

can be passed via llama-server --default-client-config defaultSettings.json.

Ultimately this gives more control back to the user to customize the server's deployment.

(And please, if there are minor issues, such as if you want to change the name of the command line flag, reviewers feel free to make changes directly.)

Copy link
Collaborator

@ngxson ngxson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bad UX practice because now user need to maintain a separated json file

it's better to re-design the config system and somehow re-use /props endpoint

@woof-dog
Copy link
Contributor Author

woof-dog commented Jul 3, 2025

this is a bad UX practice because now user need to maintain a separated json file

Could you explain what you mean? Web users don't have to do anything separate. I'm not sure how to make it any easier or future-proof than letting the server operator set a json file. The json file can be located anywhere. It's no different than requiring to set their model path or mmproj file, for example.

Maybe you want web users to save default settings globally within the UI?

it's better to re-design the config system and somehow re-use /props endpoint

I'll see if I can factor this into the props endpoint. The React structure presented some challenges.

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.

2 participants