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

Function countOpenAIModels

internal/watcher/diff/openai_compat.go:97–108  ·  view source on GitHub ↗
(models []config.OpenAICompatibilityModel)

Source from the content-addressed store, hash-verified

95}
96
97func countOpenAIModels(models []config.OpenAICompatibilityModel) int {
98 count := 0
99 for _, model := range models {
100 name := strings.TrimSpace(model.Name)
101 alias := strings.TrimSpace(model.Alias)
102 if name == "" && alias == "" {
103 continue
104 }
105 count++
106 }
107 return count
108}
109
110func openAICompatKey(entry config.OpenAICompatibility, index int) (string, string) {
111 name := strings.TrimSpace(entry.Name)

Calls

no outgoing calls

Tested by 1