From 9bc209ba731a6b5fafc5f6c646de563757b70ea3 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 2 Apr 2024 19:25:32 +0200 Subject: [PATCH] fix(welcome): stable model list (#1949) --- core/config/backend_config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/config/backend_config.go b/core/config/backend_config.go index db9c6665..9b227578 100644 --- a/core/config/backend_config.go +++ b/core/config/backend_config.go @@ -7,6 +7,7 @@ import ( "math/rand" "os" "path/filepath" + "sort" "strings" "sync" @@ -455,6 +456,11 @@ func (cl *BackendConfigLoader) GetAllBackendConfigs() []BackendConfig { for _, v := range cl.configs { res = append(res, v) } + + sort.SliceStable(res, func(i, j int) bool { + return res[i].Name < res[j].Name + }) + return res }