fix(proxy): guard nil SupportModels before dereference in setModelCache
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user