diff --git a/agent/app/service/agents.go b/agent/app/service/agents.go index 727b44b49..ca2d36fba 100644 --- a/agent/app/service/agents.go +++ b/agent/app/service/agents.go @@ -1394,19 +1394,10 @@ func (a AgentService) VerifyAccount(req dto.AgentAccountVerifyReq) error { func (a AgentService) DeleteAccount(req dto.AgentAccountDeleteReq) error { agentAccountMutationMu.Lock() defer agentAccountMutationMu.Unlock() - account, err := agentAccountRepo.GetFirst(repo.WithByID(req.ID)) + _, err := agentAccountRepo.GetFirst(repo.WithByID(req.ID)) if err != nil { return err } - if account.AppInstallID != 0 && account.Provider != "ollama" { - _, err := appInstallRepo.GetFirst(repo.WithByID(account.AppInstallID)) - if err == nil { - return buserr.WithDetail("ErrInvalidParams", "Delete the local inference engine instead", nil) - } - if !errors.Is(err, gorm.ErrRecordNotFound) { - return err - } - } if err := global.DB.Transaction(func(tx *gorm.DB) error { var agentCount int64 diff --git a/frontend/src/views/ai/model/index.vue b/frontend/src/views/ai/model/index.vue index f2fe62346..b1bcc8961 100644 --- a/frontend/src/views/ai/model/index.vue +++ b/frontend/src/views/ai/model/index.vue @@ -556,7 +556,6 @@ const accountButtons = [ { label: i18n.global.t('commons.button.delete'), permission: true, - show: (row: AI.AgentAccountItem) => !row.appInstallId || row.provider === 'ollama', click: async (row: AI.AgentAccountItem) => { await ElMessageBox.confirm( i18n.global.t('commons.msg.delete', [row.name]),