From 7d9b983f93d75d28740816a2a74a0cbfb7d3dc05 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Sat, 25 Oct 2025 16:02:09 +0200 Subject: [PATCH] Don't strip remote llama-cpp proxy prefix --- pkg/server/handlers_backends.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/server/handlers_backends.go b/pkg/server/handlers_backends.go index 74cd0bd..9ff20b5 100644 --- a/pkg/server/handlers_backends.go +++ b/pkg/server/handlers_backends.go @@ -88,9 +88,11 @@ func (h *Handler) LlamaCppProxy(onDemandStart bool) http.HandlerFunc { return } - // Strip the "/llama-cpp/" prefix from the request URL - prefix := fmt.Sprintf("/llama-cpp/%s", validatedName) - r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix) + if !inst.IsRemote() { + // Strip the "/llama-cpp/" prefix from the request URL + prefix := fmt.Sprintf("/llama-cpp/%s", validatedName) + r.URL.Path = strings.TrimPrefix(r.URL.Path, prefix) + } // Update the last request time for the instance inst.UpdateLastRequestTime()