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

Function isOpenAICompatAPIKeyAuth

sdk/cliproxy/auth/conductor.go:1010–1021  ·  view source on GitHub ↗
(auth *Auth)

Source from the content-addressed store, hash-verified

1008}
1009
1010func isOpenAICompatAPIKeyAuth(auth *Auth) bool {
1011 if !isAPIKeyAuth(auth) {
1012 return false
1013 }
1014 if strings.EqualFold(strings.TrimSpace(auth.Provider), "openai-compatibility") {
1015 return true
1016 }
1017 if auth.Attributes == nil {
1018 return false
1019 }
1020 return strings.TrimSpace(auth.Attributes["compat_name"]) != ""
1021}
1022
1023func openAICompatProviderKey(auth *Auth) string {
1024 if auth == nil {

Calls 1

isAPIKeyAuthFunction · 0.85

Tested by

no test coverage detected