Merge remote-tracking branch 'origin/feature/sunanzhi/1.6' into feature/1.6-liujian

This commit is contained in:
Liujian
2025-03-10 19:48:02 +08:00
+7 -2
View File
@@ -105,7 +105,9 @@ func (i *imlProviderModule) OnInit() {
}
} else {
provider, _ := model_runtime.NewCustomizeProvider(p.Id, p.Name, iModels, p.DefaultLLM, p.Config)
model_runtime.Register(p.Id, provider)
if provider != nil {
model_runtime.Register(p.Id, provider)
}
}
}
i.transaction.Transaction(ctx, func(ctx context.Context) error {
@@ -644,8 +646,11 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
}
// customize provider
if info.Type == 1 {
if uri, uriErr := model_runtime.GetCustomizeProviderURI(input.Config, false); uriErr != nil {
uri, uriErr := model_runtime.GetCustomizeProviderURI(input.Config, false)
if uriErr != nil {
p.SetURI(uri)
} else {
return uriErr
}
}
if *pInfo.Status == 0 {