MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / applyCoreAuthRemoval

Method applyCoreAuthRemoval

sdk/cliproxy/service.go:737–758  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

735}
736
737func (s *Service) applyCoreAuthRemoval(ctx context.Context, id string) {
738 if s == nil || id == "" {
739 return
740 }
741 if s.coreManager == nil {
742 return
743 }
744 id = strings.TrimSpace(id)
745 var provider string
746 if existing, ok := s.coreManager.GetByID(id); ok && existing != nil {
747 provider = strings.TrimSpace(existing.Provider)
748 }
749 GlobalModelRegistry().UnregisterClient(id)
750 s.coreManager.Remove(ctx, id)
751 if strings.EqualFold(provider, "codex") {
752 executor.CloseCodexWebsocketSessionsForAuthID(id, "auth_removed")
753 }
754 if strings.EqualFold(provider, "xai") {
755 executor.CloseXAIWebsocketSessionsForAuthID(id, "auth_removed")
756 }
757 s.syncPluginRuntime(ctx)
758}
759
760func (s *Service) applyRetryConfig(cfg *config.Config) {
761 if s == nil || s.coreManager == nil || cfg == nil {

Calls 7

syncPluginRuntimeMethod · 0.95
GlobalModelRegistryFunction · 0.85
GetByIDMethod · 0.80
RemoveMethod · 0.80
UnregisterClientMethod · 0.65