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

Function SummarizeCodexModels

internal/watcher/diff/models_summary.go:75–93  ·  view source on GitHub ↗

SummarizeCodexModels hashes Codex model aliases for change detection.

(models []config.CodexModel)

Source from the content-addressed store, hash-verified

73
74// SummarizeCodexModels hashes Codex model aliases for change detection.
75func SummarizeCodexModels(models []config.CodexModel) CodexModelsSummary {
76 if len(models) == 0 {
77 return CodexModelsSummary{}
78 }
79 keys := normalizeModelPairs(func(out func(key string)) {
80 for _, model := range models {
81 name := strings.TrimSpace(model.Name)
82 alias := strings.TrimSpace(model.Alias)
83 if name == "" && alias == "" {
84 continue
85 }
86 out(strings.ToLower(name) + "|" + strings.ToLower(alias))
87 }
88 })
89 return CodexModelsSummary{
90 hash: hashJoined(keys),
91 count: len(keys),
92 }
93}
94
95// SummarizeVertexModels hashes Vertex-compatible model aliases for change detection.
96func SummarizeVertexModels(models []config.VertexCompatModel) VertexModelsSummary {

Callers 1

BuildConfigChangeDetailsFunction · 0.85

Calls 2

normalizeModelPairsFunction · 0.85
hashJoinedFunction · 0.85

Tested by

no test coverage detected