MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / sortForMatching

Function sortForMatching

source code/utils/model/modelCapabilities.ts:56–60  ·  view source on GitHub ↗
(models: ModelCapability[])

Source from the content-addressed store, hash-verified

54
55// Longest-id-first so substring match prefers most specific; secondary key for stable isEqual
56function sortForMatching(models: ModelCapability[]): ModelCapability[] {
57 return [...models].sort(
58 (a, b) => b.id.length - a.id.length || a.id.localeCompare(b.id),
59 )
60}
61
62// Keyed on cache path so tests that set CLAUDE_CONFIG_DIR get a fresh read
63const loadCache = memoize(

Callers 1

refreshModelCapabilitiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected