import Decimal from 'decimal.js';
type TokenUsageSummary = {
    prompt?: number;
    completion?: number;
    total?: number;
    cached?: number;
    duration?: number;
    model?: string;
};
type GradingResultSummary = {
    cost?: number;
    tokensUsed?: TokenUsageSummary;
    componentResults?: any[];
};
export type EvalResultSummary = {
    id?: string;
    gradingResult?: GradingResultSummary;
};
export type EvalType = 'functional' | 'security';
interface AggregateAndLogEvalUsageParams {
    evalType: EvalType;
    workspaceId: string;
    evalId: string;
    evalResults: EvalResultSummary[];
    baseMetadata?: Record<string, any>;
}
type DecimalTokenTotals = {
    prompt: Decimal;
    completion: Decimal;
    total: Decimal;
    cached: Decimal;
    duration: Decimal;
};
/**
 * Aggregate evaluation cost and token usage per model (including Deepgram duration)
 * and log a single billing line per model for functional or security evaluations.
 *
 * Returns total cost and token totals across all models so callers can reuse them
 * (e.g., for metric billing).
 */
export declare function aggregateAndLogEvalUsage({ evalType, workspaceId, evalId, evalResults, baseMetadata, }: AggregateAndLogEvalUsageParams): Promise<{
    totalCost: Decimal;
    totalTokens: DecimalTokenTotals;
}>;
export {};
//# sourceMappingURL=evalBilling.d.ts.map