ComputeGeminiModelsHash returns a stable hash for Gemini model aliases.
(models []config.GeminiModel)
| 74 | |
| 75 | // ComputeGeminiModelsHash returns a stable hash for Gemini model aliases. |
| 76 | func ComputeGeminiModelsHash(models []config.GeminiModel) string { |
| 77 | keys := normalizeModelPairs(func(out func(key string)) { |
| 78 | for _, model := range models { |
| 79 | name := strings.TrimSpace(model.Name) |
| 80 | alias := strings.TrimSpace(model.Alias) |
| 81 | if name == "" && alias == "" { |
| 82 | continue |
| 83 | } |
| 84 | out(strings.ToLower(name) + "|" + strings.ToLower(alias)) |
| 85 | } |
| 86 | }) |
| 87 | return hashJoined(keys) |
| 88 | } |
| 89 | |
| 90 | // ComputeExcludedModelsHash returns a normalized hash for excluded model lists. |
| 91 | func ComputeExcludedModelsHash(excluded []string) string { |
no test coverage detected