MCPcopy Create free account
hub / github.com/alibaba/open-code-review / activeModelForProvider

Function activeModelForProvider

cmd/opencodereview/config_cmd.go:954–962  ·  view source on GitHub ↗
(cfg *Config, providerName string, entry ProviderEntry)

Source from the content-addressed store, hash-verified

952}
953
954func activeModelForProvider(cfg *Config, providerName string, entry ProviderEntry) string {
955 if entry.Model != "" {
956 return entry.Model
957 }
958 if cfg != nil && cfg.Provider == providerName && cfg.Model != "" {
959 return cfg.Model
960 }
961 return ""
962}
963
964func normalizeModelList(models []string) []string {
965 out := make([]string, 0, len(models))

Calls

no outgoing calls