server : properly handle null llama_context (#25868)

Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com>
This commit is contained in:
fairydreaming
2026-07-21 17:47:17 +02:00
committed by GitHub
parent f048010180
commit 40b740ad05

View File

@@ -1152,6 +1152,11 @@ private:
return false;
}
if (ctx_tgt == nullptr) {
SRV_ERR("failed to create_context with model '%s'\n", params_base.model.path.c_str());
return false;
}
vocab = llama_model_get_vocab(model_tgt);
n_ctx = llama_n_ctx(ctx_tgt);