MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / isCacheValid

Function isCacheValid

src/utils/modelCache.ts:38–41  ·  view source on GitHub ↗
(cache: ModelCache | null)

Source from the content-addressed store, hash-verified

36}
37
38function isCacheValid(cache: ModelCache | null): boolean {
39 if (!cache) return false;
40 return Date.now() - cache.timestamp < CACHE_TTL_MS;
41}
42
43export async function fetchOpenAIModels(apiKey: string): Promise<string[]> {
44 try {

Callers 1

fetchModelsForProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected