Merge pull request #1170 from BianBianY/main

feat: optimization enable/disable auth files
This commit is contained in:
Luis Pater
2026-01-28 09:34:35 +08:00
committed by GitHub
4 changed files with 22 additions and 2 deletions

View File

@@ -681,6 +681,10 @@ func (s *Service) registerModelsForAuth(a *coreauth.Auth) {
if a == nil || a.ID == "" {
return
}
if a.Disabled {
GlobalModelRegistry().UnregisterClient(a.ID)
return
}
authKind := strings.ToLower(strings.TrimSpace(a.Attributes["auth_kind"]))
if authKind == "" {
if kind, _ := a.AccountInfo(); strings.EqualFold(kind, "api_key") {