/**
 * Per-model token bucket rate limiter.
 * Default: 60 requests per minute per model.
 */
export interface RateLimitConfig {
    maxRequests: number;
    windowMs: number;
}
export interface RateLimitResult {
    allowed: boolean;
    remaining: number;
    retryAfterMs?: number;
}
/**
 * Check if a request to this model is allowed.
 */
export declare function checkRateLimit(modelId: string, config?: RateLimitConfig): RateLimitResult;
export interface RateLimitStats {
    remaining: number;
    total: number;
    resetAtMs: number;
}
/**
 * Get rate limit stats for all tracked models.
 */
export declare function getRateLimitStats(): Record<string, RateLimitStats>;
/**
 * Prune stale rate limit buckets not accessed in the given window.
 * Call periodically (e.g., every 5 minutes) to prevent unbounded growth.
 */
export declare function pruneRateLimitBuckets(maxIdleMs?: number): number;
/**
 * Reset all rate limit buckets (for testing).
 */
export declare function resetRateLimits(): void;
