/** * Cost tracking and estimation for LLM API usage. */ /** * Token usage information. */ export interface TokenUsage { inputTokens: number; outputTokens: number; totalTokens: number; } /** * Cost estimation result. */ export interface CostEstimate { usage: TokenUsage; costUSD: number; model: string; breakdown: { inputCost: number; outputCost: number; }; } /** * Cumulative cost tracker for a session. */ export declare class CostTracker { private model; private totalInputTokens; private totalOutputTokens; private callCount; constructor(model: string); /** * Add token usage from an API call. */ addUsage(inputTokens: number, outputTokens: number): void; /** * Get total usage so far. */ getUsage(): TokenUsage; /** * Get total cost estimate. */ getCost(): CostEstimate; /** * Get call count. */ getCallCount(): number; /** * Format cost summary for display. */ formatSummary(): string; } /** * Estimate cost for an interview before running. */ export declare function estimateInterviewCost(model: string, toolCount: number, questionsPerTool: number, personas?: number): CostEstimate; /** * Format a pre-interview cost estimate. */ export declare function formatCostEstimate(estimate: CostEstimate): string; /** * Get pricing info for a model. */ export declare function getModelPricing(model: string): { input: number; output: number; } | null; /** * Time estimation result for an interview. */ export interface InterviewTimeEstimate { /** Estimated duration in seconds */ durationSeconds: number; /** Estimated duration in minutes (rounded) */ durationMinutes: number; /** Whether estimate assumes parallel execution */ isParallel: boolean; /** Whether using a local model (slower) */ isLocalModel: boolean; } /** * Check if a provider uses local inference (slower than cloud APIs). */ export declare function isLocalProvider(provider: string): boolean; /** * Estimate interview time based on tool count and configuration. */ export declare function estimateInterviewTime(toolCount: number, questionsPerTool: number, personas: number, parallelPersonas?: boolean, provider?: string, promptCount?: number, resourceCount?: number, checkMode?: boolean): InterviewTimeEstimate; /** * Format a combined cost and time estimate for display. */ export declare function formatCostAndTimeEstimate(cost: CostEstimate, time: InterviewTimeEstimate): string; /** * Optimization suggestion for reducing cost or time. */ export interface OptimizationSuggestion { /** Flag to use (e.g., "--ci") */ flag: string; /** Human-readable description */ description: string; /** Estimated savings (e.g., "~80% cheaper") */ estimatedSavings: string; /** Priority for sorting suggestions */ priority: 'high' | 'medium' | 'low'; } /** * Context for generating optimization suggestions. */ export interface OptimizationContext { /** Estimated cost in USD */ estimatedCost: number; /** Number of tools discovered */ toolCount: number; /** Number of personas being used */ personaCount: number; /** Whether using parallel personas */ isParallelPersonas: boolean; /** Whether using a premium model (--quality flag) */ isPremiumModel: boolean; /** Whether using CI preset */ isUsingCiPreset: boolean; /** Whether scenarios file exists */ hasScenariosFile: boolean; } /** * Generate optimization suggestions based on the interview context. */ export declare function suggestOptimizations(context: OptimizationContext): OptimizationSuggestion[]; /** * Format optimization suggestions for CLI display. */ export declare function formatOptimizationSuggestions(suggestions: OptimizationSuggestion[], maxSuggestions?: number): string; //# sourceMappingURL=tracker.d.ts.map