/**
 * Model Analytics
 *
 * Tracks per-model, per-task-type performance metrics in SQLite.
 * Used by the dashboard to show model usage, cost, and success rates.
 */
import type { TaskComplexity } from './types.js';
export interface TaskOutcome {
    modelId: string;
    taskType: string;
    complexity: TaskComplexity;
    success: boolean;
    durationMs: number;
    tokensUsed: {
        input: number;
        output: number;
    };
    cost: number;
    taskId?: string;
    timestamp?: string;
}
export interface ModelMetrics {
    modelId: string;
    taskType: string;
    totalTasks: number;
    successes: number;
    failures: number;
    successRate: number;
    avgDurationMs: number;
    totalTokensIn: number;
    totalTokensOut: number;
    totalCost: number;
}
export interface CostBreakdown {
    modelId: string;
    totalCost: number;
    taskCount: number;
    avgCostPerTask: number;
    totalTokensIn: number;
    totalTokensOut: number;
}
export interface SessionModelUsage {
    modelId: string;
    taskCount: number;
    totalTokensIn: number;
    totalTokensOut: number;
    totalCost: number;
    successRate: number;
}
export declare class ModelAnalytics {
    private db;
    constructor(dbPath?: string);
    private initialize;
    /**
     * Record a task outcome
     */
    recordOutcome(outcome: TaskOutcome): void;
    /**
     * Get success rate for a model, optionally filtered by task type
     */
    getSuccessRate(modelId: string, taskType?: string): number;
    /**
     * Get average latency for a model
     */
    getAvgLatency(modelId: string, taskType?: string): number;
    /**
     * Get metrics grouped by model and task type
     */
    getMetrics(modelId?: string): ModelMetrics[];
    /**
     * Get cost breakdown per model
     */
    getCostBreakdown(since?: Date): CostBreakdown[];
    /**
     * Get session model usage (all outcomes in current session)
     */
    getSessionUsage(): SessionModelUsage[];
    /**
     * Get outcomes for a specific task
     */
    getTaskOutcomes(taskId: string): TaskOutcome[];
    /**
     * Get optimal routing suggestion based on historical data
     */
    getOptimalRouting(): Record<string, string>;
    /**
     * Get total session cost
     */
    getTotalCost(): number;
    close(): void;
}
export declare function getModelAnalytics(): ModelAnalytics;
//# sourceMappingURL=analytics.d.ts.map