]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
feat: pre-select models in the webui using alias (#25492)
authorfelix <redacted>
Fri, 10 Jul 2026 13:04:00 +0000 (13:04 +0000)
committerGitHub <redacted>
Fri, 10 Jul 2026 13:04:00 +0000 (15:04 +0200)
Co-authored-by: example name <redacted>
tools/ui/src/lib/stores/models.svelte.ts

index 45dc1f349f95232a6472ce91ebf56afe134d25c8..4c7c7cdfec243c2a18a281e8c746150bf141a5fe 100644 (file)
@@ -633,7 +633,12 @@ class ModelsStore {
        }
 
        findModelByName(modelName: string): ModelOption | null {
-               return this.models.find((model) => model.model === modelName) ?? null;
+               return (
+                       this.models.find(
+                               (model) =>
+                                       model.model === modelName || model.id === modelName || model.aliases?.includes(modelName)
+                       ) ?? null
+               );
        }
 
        findModelById(modelId: string): ModelOption | null {