import type { CatalogModel } from './model-catalog.js'; interface CatalogCacheFile { version: typeof CATALOG_CACHE_VERSION; fetchedAt: number; ttlMs: number; models: CatalogModel[]; } /** * Version 2: `pricing` became nullable, a model whose catalog entry carries * no cost is honestly unpriced instead of coerced to $0. Version-1 caches * (which baked in the $0 coercion) are discarded and refetched. * * Version 3: `reasoningOptions` carries the feed's per-model `reasoning_options` * array, which decides what reasoning levels each model really accepts. * Version-2 caches predate the field, so they are discarded and refetched * rather than left to fall through to the curated family table for a day. * * Version 4: `inputModalities` carries the feed's per-model `modalities.input` * list, which decides `multimodal` per model instead of by vendor. Version-3 * caches predate the field; left in place they would report every model as * text-only for a day, so they are discarded and refetched. */ declare const CATALOG_CACHE_VERSION = 4; export declare function getCatalogCachePath(cacheDir: string): string; export declare function getCatalogTmpPath(cacheDir: string): string; declare function loadCatalogCache(cachePath: string): CatalogCacheFile | null; declare function saveCatalogCache(models: CatalogModel[], cachePath: string, tmpPath: string): void; declare function isCatalogCacheStale(cache: CatalogCacheFile): boolean; /** * Fetch models.dev/api.json and parse into CatalogModel[]. * Uses a 30-second timeout. */ export declare function fetchCatalog(): Promise; export { loadCatalogCache, saveCatalogCache, isCatalogCacheStale, }; //# sourceMappingURL=model-catalog-cache.d.ts.map