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