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

Function debugLogAuthSelection

sdk/cliproxy/auth/conductor.go:5672–5692  ·  view source on GitHub ↗
(entry *log.Entry, auth *Auth, provider string, model string)

Source from the content-addressed store, hash-verified

5670}
5671
5672func debugLogAuthSelection(entry *log.Entry, auth *Auth, provider string, model string) {
5673 if !log.IsLevelEnabled(log.DebugLevel) {
5674 return
5675 }
5676 if entry == nil || auth == nil {
5677 return
5678 }
5679 accountType, accountInfo := auth.AccountInfo()
5680 proxyInfo := auth.ProxyInfo()
5681 suffix := ""
5682 if proxyInfo != "" {
5683 suffix = " " + proxyInfo
5684 }
5685 switch accountType {
5686 case "api_key":
5687 entry.Debugf("Use API key %s for model %s%s", util.HideAPIKey(accountInfo), model, suffix)
5688 case "oauth":
5689 ident := formatOauthIdentity(auth, provider, accountInfo)
5690 entry.Debugf("Use OAuth %s for model %s%s", ident, model, suffix)
5691 }
5692}
5693
5694func formatOauthIdentity(auth *Auth, provider string, accountInfo string) string {
5695 if auth == nil {

Callers 3

executeMixedOnceMethod · 0.85
executeCountMixedOnceMethod · 0.85

Calls 4

HideAPIKeyFunction · 0.92
formatOauthIdentityFunction · 0.85
AccountInfoMethod · 0.80
ProxyInfoMethod · 0.80

Tested by

no test coverage detected