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

Function openAICompatProviderKey

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

Source from the content-addressed store, hash-verified

1021}
1022
1023func openAICompatProviderKey(auth *Auth) string {
1024 if auth == nil {
1025 return ""
1026 }
1027 if auth.Attributes != nil {
1028 if providerKey := strings.TrimSpace(auth.Attributes["provider_key"]); providerKey != "" {
1029 return util.OpenAICompatibleProviderKey(providerKey)
1030 }
1031 if compatName := strings.TrimSpace(auth.Attributes["compat_name"]); compatName != "" {
1032 return util.OpenAICompatibleProviderKey(compatName)
1033 }
1034 }
1035 return util.OpenAICompatibleProviderKey(auth.Provider)
1036}
1037
1038func openAICompatModelPoolKey(auth *Auth, requestedModel string) string {
1039 base := strings.TrimSpace(thinking.ParseSuffix(requestedModel).ModelName)

Callers 1

openAICompatModelPoolKeyFunction · 0.85

Calls 1

Tested by

no test coverage detected