(auth *Auth, requestedModel string, aliasResult OAuthModelAliasResult)
| 1251 | } |
| 1252 | |
| 1253 | func executionAliasPoolModel(auth *Auth, requestedModel string, aliasResult OAuthModelAliasResult) string { |
| 1254 | if auth != nil && auth.AuthKind() == AuthKindAPIKey { |
| 1255 | if strings.TrimSpace(requestedModel) != "" { |
| 1256 | return requestedModel |
| 1257 | } |
| 1258 | } |
| 1259 | if strings.TrimSpace(aliasResult.UpstreamModel) != "" { |
| 1260 | return aliasResult.UpstreamModel |
| 1261 | } |
| 1262 | return requestedModel |
| 1263 | } |
| 1264 | |
| 1265 | func (m *Manager) resolveAPIKeyModelAliasWithResult(auth *Auth, requestedModel string) OAuthModelAliasResult { |
| 1266 | if m == nil || auth == nil { |
no test coverage detected