(auth *Auth)
| 1008 | } |
| 1009 | |
| 1010 | func 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 | |
| 1023 | func openAICompatProviderKey(auth *Auth) string { |
| 1024 | if auth == nil { |
no test coverage detected