(auth *Auth)
| 1021 | } |
| 1022 | |
| 1023 | func 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 | |
| 1038 | func openAICompatModelPoolKey(auth *Auth, requestedModel string) string { |
| 1039 | base := strings.TrimSpace(thinking.ParseSuffix(requestedModel).ModelName) |
no test coverage detected