export type PricingRefreshResult = { status: 'disabled'; reason: string; } | { status: 'fresh'; fetchedAt: string; } | { status: 'updated'; fetchedAt: string; models: number; } | { status: 'failed'; reason: string; }; export interface PricingRefreshOptions { env?: NodeJS.ProcessEnv; now?: number; cachePath?: string; /** Injected in tests; defaults to downloading the list. */ download?: (url: string) => Promise; /** Ignore the cache's age. */ force?: boolean; } /** * The second of the package's two network requests (the first is the update * check): a GET for LiteLLM's public price list. It sends no usage data and no * identifier. */ export declare function downloadPriceList(url: string): Promise; /** * Downloads the community price list if the cached copy is more than a day old. * * Never throws. A failure leaves the cached copy -- and so the prices in force * -- exactly as they were: an old list is still correct for every model it * covers, and a list that downloads but yields no usable prices is treated as a * failure rather than allowed to replace one that did. */ export declare function refreshCommunityPricing(options?: PricingRefreshOptions): Promise; /** * Keeps a long-running process's prices current: refreshes now, then looks * again every hour. The refresh itself decides whether a download is due, so * most looks cost one small file read. * * The timer is unref'd, so it never keeps a process alive on its own. */ export declare function startPricingWatch(refresh: () => Promise, intervalMs?: number): () => void;