MCPcopy
hub / github.com/codeaashu/claude-code / getModelCapability

Function getModelCapability

src/utils/model/modelCapabilities.ts:75–83  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

73)
74
75export function getModelCapability(model: string): ModelCapability | undefined {
76 if (!isModelCapabilitiesEligible()) return undefined
77 const cached = loadCache(getCachePath())
78 if (!cached || cached.length === 0) return undefined
79 const m = model.toLowerCase()
80 const exact = cached.find(c => c.id.toLowerCase() === m)
81 if (exact) return exact
82 return cached.find(c => m.includes(c.id.toLowerCase()))
83}
84
85export async function refreshModelCapabilities(): Promise<void> {
86 if (!isModelCapabilitiesEligible()) return

Callers 2

getContextWindowForModelFunction · 0.85
getModelMaxOutputTokensFunction · 0.85

Calls 2

getCachePathFunction · 0.70

Tested by

no test coverage detected