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