fix: resolve error caused by fetching empty vendor config model

This commit is contained in:
sunanzhi
2025-03-07 14:33:23 +08:00
parent d979eb7c2a
commit 80b388bfc6
+1 -2
View File
@@ -474,10 +474,9 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr
defaultLLM, has := p.GetModel(info.DefaultLLM)
if !has {
model, has := p.DefaultModel(model_runtime.ModelTypeLLM)
if !has {
if !has || model == nil {
defaultLLM, _ = model_runtime.NewCustomizeModel("", "", "", "", "")
}
defaultLLM = model
}
return &ai_dto.Provider{