server : make models endpoints private when authentication is enabled (#26347)

* server : make models endpoints private when authentication is enabled

* tests : fix models endpoint auth
This commit is contained in:
s0mecode
2026-08-19 22:44:42 +04:00
committed by GitHub
parent dc72703fc6
commit ee0ea03adf
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -235,8 +235,8 @@ int llama_server(common_params & params, int argc, char ** argv) {
ctx_http.get ("/metrics", ex_wrapper(routes.get_metrics));
ctx_http.get ("/props", ex_wrapper(routes.get_props));
ctx_http.post("/props", ex_wrapper(routes.post_props));
ctx_http.get ("/models", ex_wrapper(routes.get_models)); // public endpoint (no API key check)
ctx_http.get ("/v1/models", ex_wrapper(routes.get_models)); // public endpoint (no API key check)
ctx_http.get ("/models", ex_wrapper(routes.get_models));
ctx_http.get ("/v1/models", ex_wrapper(routes.get_models));
ctx_http.post("/completion", ex_wrapper(routes.post_completions)); // legacy
ctx_http.post("/completions", ex_wrapper(routes.post_completions));
ctx_http.post("/v1/completions", ex_wrapper(routes.post_completions_oai));