/**
 * Cost Predictor
 *
 * Estimates the cost of a request BEFORE execution based on:
 * - Input token count from messages
 * - Historical average output tokens (from CostTracker stats)
 * - Model-specific pricing
 *
 * @module analytics
 */
import type { CostTracker } from '../utils/cost-tracker.js';
export interface CostPrediction {
    /** Estimated number of input tokens */
    estimatedInputTokens: number;
    /** Estimated number of output tokens */
    estimatedOutputTokens: number;
    /** Estimated cost in USD */
    estimatedCost: number;
    /** Model used for the prediction */
    model: string;
    /** Confidence level of the prediction */
    confidence: 'low' | 'medium' | 'high';
}
/**
 * Cost Predictor - Estimates request cost before execution
 */
export declare class CostPredictor {
    private costTracker;
    constructor(costTracker: CostTracker);
    /**
     * Estimate cost based on message history length and model.
     *
     * @param messages - The messages array to be sent to the LLM
     * @param model - The model identifier
     * @returns A cost prediction with estimated tokens, cost, and confidence
     */
    predict(messages: Array<{
        role: string;
        content: string;
    }>, model: string): CostPrediction;
    /**
     * Get average cost per request from recorded history.
     *
     * @returns Average cost in USD, or 0 if no history exists
     */
    getAverageCostPerRequest(): number;
    /**
     * Get cost trend based on recent usage history.
     *
     * Compares the average cost of the first half of recent usage
     * to the second half. A >20% change in either direction is
     * considered increasing or decreasing.
     *
     * @returns 'increasing', 'decreasing', or 'stable'
     */
    getCostTrend(): 'increasing' | 'decreasing' | 'stable';
    /**
     * Estimate input token count from messages.
     *
     * Uses a character-based heuristic (approximately 4 characters per token)
     * as a fast approximation without requiring tiktoken.
     */
    private estimateInputTokens;
    /**
     * Estimate output tokens based on historical average.
     *
     * If the cost tracker has recorded usage, uses the average
     * output token count. Otherwise falls back to a default estimate.
     */
    private estimateOutputTokens;
    /**
     * Determine prediction confidence based on available data.
     *
     * - high: 5+ recent usage entries (good historical data)
     * - medium: 1-4 recent entries (some data)
     * - low: no recent usage (pure estimation)
     */
    private determineConfidence;
}
