MCPcopy Index your code
hub / github.com/Noumena-Network/code / getModelCapability

Function getModelCapability

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

Source from the content-addressed store, hash-verified

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

Callers 2

getContextWindowForModelFunction · 0.85
getModelMaxOutputTokensFunction · 0.85

Calls 2

getCachePathFunction · 0.70

Tested by

no test coverage detected