server_metrics metrics;
- json json_ui_settings = json::object(); // Primary: new name
- json json_webui_settings = json::object(); // Deprecated: use json_ui_settings instead (kept for compat)
+ json json_ui_settings = json::object();
// Necessary similarity of prompt for slot selection
float slot_prompt_similarity = 0.0f;
try {
json json_settings = json::parse(cfg);
json_ui_settings = json_settings;
- json_webui_settings = json_settings; // deprecated: keep in sync
} catch (const std::exception & e) {
SRV_ERR("%s: failed to parse UI config: %s\n", __func__, e.what());
return false;
/* has_inp_audio */ impl->chat_params.allow_audio,
/* has_inp_video */ impl->chat_params.allow_video,
/* json_ui_settings */ impl->json_ui_settings,
- /* json_webui_settings */ impl->json_webui_settings, // Deprecated
/* slot_n_ctx */ impl->get_slot_n_ctx(),
/* pooling_type */ llama_pooling_type(impl->ctx_tgt),
{ "endpoint_slots", params.endpoint_slots },
{ "endpoint_props", params.endpoint_props },
{ "endpoint_metrics", params.endpoint_metrics },
- // New keys
{ "ui", params.ui },
{ "ui_settings", meta->json_ui_settings },
- // Deprecated: use ui/ui_settings instead (kept for backward compat)
- { "webui", params.ui },
- { "webui_settings", meta->json_ui_settings },
{ "chat_template", tmpl_default },
{ "chat_template_caps", meta->chat_template_caps },
{ "bos_token", meta->bos_token_str },
bool has_inp_image;
bool has_inp_audio;
bool has_inp_video;
- json json_ui_settings; // Primary: new name
- json json_webui_settings; // Deprecated: use json_ui_settings instead (kept for backward compat)
+ json json_ui_settings;
int slot_n_ctx;
enum llama_pooling_type pooling_type;
}},
// New key
{"ui_settings", ui_settings},
- {"webui_settings", webui_settings},
{"build_info", std::string(llama_build_info())},
{"cors_proxy_enabled", params.ui_mcp_proxy},
});
struct server_models_routes {
common_params params;
json ui_settings = json::object(); // Primary: new name
- json webui_settings = json::object(); // Deprecated: use ui_settings (kept for compat)
std::atomic<bool> stopping = false; // for graceful disconnecting SSE clients during shutdown
server_models models;
server_models_routes(const common_params & params, int argc, char ** argv)
try {
json json_settings = json::parse(cfg);
ui_settings = json_settings;
- webui_settings = json_settings; // Deprecated: keep in sync
} catch (const std::exception & e) {
LOG_ERR("%s: failed to parse UI config: %s\n", __func__, e.what());
throw;
assert match_regex("(little|girl)+", res.body["content"])
-def test_no_webui():
+def test_no_ui():
global server
- # default: webui enabled
+ # default: UI enabled
server.start()
url = f"http://{server.server_host}:{server.server_port}"
res = requests.get(url)
assert "<!doctype html>" in res.text
server.stop()
- # with --no-webui
- server.no_webui = True
+ # with --no-ui, the UI should be disabled
+ server.no_ui = True
server.start()
res = requests.get(url)
assert res.status_code == 404
def test_mcp_no_proxy():
global server
- server.webui_mcp_proxy = False
+ server.ui_mcp_proxy = False
server.start()
res = server.make_request("GET", "/cors-proxy")
def test_mcp_proxy():
global server
- server.webui_mcp_proxy = True
+ server.ui_mcp_proxy = True
server.start()
url = f"http://{server.server_host}:{server.server_port}/cors-proxy?url=http://example.com"
def test_mcp_proxy_custom_port():
global server
- server.webui_mcp_proxy = True
+ server.ui_mcp_proxy = True
server.start()
# try getting the server's models API via the proxy
enable_ctx_shift: int | None = False
spec_draft_n_min: int | None = None
spec_draft_n_max: int | None = None
- no_webui: bool | None = None
+ no_ui: bool | None = None
jinja: bool | None = None
reasoning_format: Literal['deepseek', 'none', 'nothink'] | None = None
reasoning: Literal['on', 'off', 'auto'] | None = None
cache_ram: int | None = None
no_cache_idle_slots: bool = False
log_path: str | None = None
- webui_mcp_proxy: bool = False
+ ui_mcp_proxy: bool = False
backend_sampling: bool = False
gcp_compat: bool = False
server_args.extend(["--spec-draft-n-max", self.spec_draft_n_max])
if self.spec_draft_n_min:
server_args.extend(["--spec-draft-n-min", self.spec_draft_n_min])
- if self.no_webui:
- server_args.append("--no-webui")
+ if self.no_ui:
+ server_args.append("--no-ui")
if self.no_models_autoload:
server_args.append("--no-models-autoload")
if self.jinja:
server_args.extend(["--cache-ram", self.cache_ram])
if self.no_cache_idle_slots:
server_args.append("--no-cache-idle-slots")
- if self.webui_mcp_proxy:
- server_args.append("--webui-mcp-proxy")
+ if self.ui_mcp_proxy:
+ server_args.append("--ui-mcp-proxy")
if self.backend_sampling:
server_args.append("--backend_sampling")
if self.gcp_compat: