/**
 * Per-model performance tracker.
 *
 * Records real request metrics (tokens/s, latency, success rate) per model.
 * Used to feed accurate data into cost estimation, intent routing weights,
 * and the /perf REPL command.
 *
 * Thread-safe via single-threaded Node.js event loop guarantee.
 */
export interface ModelMetrics {
    /** Model identifier */
    modelId: string;
    /** Total requests completed */
    requestCount: number;
    /** Total input tokens processed */
    totalInputTokens: number;
    /** Total output tokens generated */
    totalOutputTokens: number;
    /** Total wall-clock time across all requests (ms) */
    totalDurationMs: number;
    /** Fastest request (ms) */
    minDurationMs: number;
    /** Slowest request (ms) */
    maxDurationMs: number;
    /** Number of failed requests (5xx or connection errors) */
    failureCount: number;
    /** Last request timestamp */
    lastRequestAt: string;
    /** First request timestamp */
    firstRequestAt: string;
}
export interface ModelPerfSummary {
    modelId: string;
    requestCount: number;
    avgDurationMs: number;
    avgOutputTps: number;
    successRate: number;
    totalInputTokens: number;
    totalOutputTokens: number;
    p50DurationMs: number;
}
export interface RequestRecord {
    modelId: string;
    inputTokens: number;
    outputTokens: number;
    durationMs: number;
    success: boolean;
}
/**
 * Record a completed request's metrics.
 */
export declare function recordRequestMetrics(record: RequestRecord): void;
/**
 * Get raw metrics for a model.
 */
export declare function getModelMetrics(modelId: string): ModelMetrics | undefined;
/**
 * Get all model metrics.
 */
export declare function getAllModelMetrics(): ModelMetrics[];
/**
 * Get performance summary for a model.
 */
export declare function getModelPerfSummary(modelId: string): ModelPerfSummary | null;
/**
 * Format performance summary for display.
 */
export declare function formatPerfSummary(summary: ModelPerfSummary): string;
/**
 * Format all model performance summaries.
 */
export declare function formatAllPerfSummaries(): string;
/**
 * Reset all metrics (for testing).
 */
export declare function resetModelMetrics(): void;
