/** * Gateway-served model pricing, providers whose own /models payload carries * machine-readable rates (beyond OpenRouter, which model-limits.ts already * fetches). Evidence per gateway (probed 2026-07-12): * * - aihubmix GET https://aihubmix.com/api/v1/models * `pricing: { input, output, cache_read?, cache_write? }`, absolute USD * per 1M tokens (claude-fable-5: input 11 / output 55 / cache_read 1.1 / * cache_write 13.75). * - vercel-ai-gateway GET https://ai-gateway.vercel.sh/v1/models * `pricing: { input, output, input_cache_read?, input_cache_write? }`, * USD per single token as strings (OpenRouter-style). Tiered variants * (`input_tiers` etc.) exist; the flat base rate is used. * * Each gateway gets its own 24h-TTL cache file. A failed refresh degrades to * the cached rates with their fetch date, never to zero. A model absent * from the payload resolves to null (unpriced), never $0. */ import type { ProviderServedPricing } from './model-pricing.js'; export declare function gatewayPricingCachePath(cacheDir: string, providerId: string): string; export interface GatewayPricingServiceOptions { readonly cacheDir: string; } /** * Lazy, cache-first pricing lookups for gateways that publish rates. The * first lookup for a gateway loads its disk cache and, when the cache is * absent or stale, starts ONE background refresh; lookups keep serving the * cached rates (with their date) meanwhile. No cache and no completed * refresh -> null (honest unpriced), never $0. */ export declare class GatewayPricingService { private readonly options; private readonly caches; private readonly refreshing; constructor(options: GatewayPricingServiceOptions); /** True when this provider id has a pricing-bearing /models adapter. */ static supports(providerId: string): boolean; getPricing(providerId: string, modelId: string): ProviderServedPricing | null; private ensureCache; private cachePath; private loadCache; private startRefresh; refresh(providerId: string): Promise; } //# sourceMappingURL=gateway-pricing.d.ts.map