fix(proxy): guard nil SupportModels before dereference in setModelCache

This commit is contained in:
Sakurasan
2026-08-30 03:16:50 +08:00
parent 963da99fd6
commit aa0d87f132
+1 -1
View File
@@ -34,7 +34,7 @@ func (p *Proxy) setModelCache() error {
for _, sm := range k.SupportModelsArray {
models[sm] = true
}
} else {
} else if k.SupportModels != nil {
var sma []string
json.Unmarshal([]byte(*k.SupportModels), &sma) // nolint:errCheck
for _, sm := range sma {