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

Function applyOAuthModelAliasForAuth

sdk/cliproxy/service.go:2588–2601  ·  view source on GitHub ↗
(cfg *config.Config, provider, authKind string, attributes map[string]string, models []*ModelInfo)

Source from the content-addressed store, hash-verified

2586}
2587
2588func applyOAuthModelAliasForAuth(cfg *config.Config, provider, authKind string, attributes map[string]string, models []*ModelInfo) []*ModelInfo {
2589 if len(models) == 0 {
2590 return models
2591 }
2592 channel := coreauth.OAuthModelAliasChannel(provider, authKind)
2593 if channel == "" {
2594 return models
2595 }
2596 aliases := oauthModelAliasesForAuth(cfg, channel, attributes)
2597 if len(aliases) == 0 {
2598 return models
2599 }
2600 return applyOAuthModelAliasEntries(aliases, models)
2601}
2602
2603func oauthModelAliasesForAuth(cfg *config.Config, channel string, attributes map[string]string) []config.OAuthModelAlias {
2604 perAuthAliases := coreauth.OAuthModelAliasesFromAttributes(attributes)

Calls 2

oauthModelAliasesForAuthFunction · 0.85

Tested by 1