Merge branch 'feature/sunanzhi/1.6' into 'main'

fix: resolve error caused by fetching empty vendor config model

See merge request apipark/APIPark!241
This commit is contained in:
孙安智
2025-03-07 14:33:49 +08:00
+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{