server : add props.model_alias (#16943)

* server : add props.model_alias

* webui : npm run format
This commit is contained in:
Georgi Gerganov
2025-11-03 15:38:23 +02:00
committed by GitHub
parent 622cd010ff
commit 48bd26501b
3 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@@ -4910,6 +4910,7 @@ int main(int argc, char ** argv) {
json data = { json data = {
{ "default_generation_settings", default_generation_settings_for_props }, { "default_generation_settings", default_generation_settings_for_props },
{ "total_slots", ctx_server.params_base.n_parallel }, { "total_slots", ctx_server.params_base.n_parallel },
{ "model_alias", ctx_server.params_base.model_alias },
{ "model_path", ctx_server.params_base.model.path }, { "model_path", ctx_server.params_base.model.path },
{ "modalities", json { { "modalities", json {
{"vision", ctx_server.oai_parser_opt.allow_image}, {"vision", ctx_server.oai_parser_opt.allow_image},

View File

@@ -99,6 +99,9 @@ class ServerStore {
} }
get modelName(): string | null { get modelName(): string | null {
if (this._serverProps?.model_alias) {
return this._serverProps.model_alias;
}
if (!this._serverProps?.model_path) return null; if (!this._serverProps?.model_path) return null;
return this._serverProps.model_path.split(/(\\|\/)/).pop() || null; return this._serverProps.model_path.split(/(\\|\/)/).pop() || null;
} }