(model: string)
| 73 | ) |
| 74 | |
| 75 | export 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 | |
| 85 | export async function refreshModelCapabilities(): Promise<void> { |
| 86 | if (!isModelCapabilitiesEligible()) return |
no test coverage detected