From bf655a10875630a6fe5f283340b6d390a1920b58 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 7 Mar 2026 18:42:12 +0300 Subject: Enha: llama.cpp on non localhost --- helpfuncs.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'helpfuncs.go') diff --git a/helpfuncs.go b/helpfuncs.go index b94e672..370f4de 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -5,7 +5,6 @@ import ( "gf-lt/models" "gf-lt/pngmeta" "image" - "net/url" "os" "os/exec" "path" @@ -323,12 +322,10 @@ func strInSlice(s string, sl []string) bool { // isLocalLlamacpp checks if the current API is a local llama.cpp instance. func isLocalLlamacpp() bool { - u, err := url.Parse(cfg.CurrentAPI) - if err != nil { + if strings.Contains(cfg.CurrentAPI, "openrouter") || strings.Contains(cfg.CurrentAPI, "deepseek") { return false } - host := u.Hostname() - return host == "localhost" || host == "127.0.0.1" || host == "::1" + return true } // getModelColor returns the cached color tag for the model name. -- cgit v1.2.3