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

Function ComputeClaudeModelsHash

internal/watcher/diff/model_hash.go:46–58  ·  view source on GitHub ↗

ComputeClaudeModelsHash returns a stable hash for Claude model aliases.

(models []config.ClaudeModel)

Source from the content-addressed store, hash-verified

44
45// ComputeClaudeModelsHash returns a stable hash for Claude model aliases.
46func ComputeClaudeModelsHash(models []config.ClaudeModel) string {
47 keys := normalizeModelPairs(func(out func(key string)) {
48 for _, model := range models {
49 name := strings.TrimSpace(model.Name)
50 alias := strings.TrimSpace(model.Alias)
51 if name == "" && alias == "" {
52 continue
53 }
54 out(strings.ToLower(name) + "|" + strings.ToLower(alias))
55 }
56 })
57 return hashJoined(keys)
58}
59
60// ComputeCodexModelsHash returns a stable hash for Codex model aliases.
61func ComputeCodexModelsHash(models []config.CodexModel) string {

Calls 2

normalizeModelPairsFunction · 0.85
hashJoinedFunction · 0.85