fix(welcome): stable model list (#1949)

This commit is contained in:
Ettore Di Giacinto
2024-04-02 19:25:32 +02:00
committed by GitHub
parent 84e0dc3246
commit 9bc209ba73

View File

@@ -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
}