import type { AgentMetrics } from './base.js';
export type LLMModelUsage = {
    type: 'llm_usage';
    /** The provider name (e.g., 'openai', 'anthropic'). */
    provider: string;
    /** The model name (e.g., 'gpt-4o', 'claude-3-5-sonnet'). */
    model: string;
    /** Total input tokens. */
    inputTokens: number;
    /** Input tokens served from cache. */
    inputCachedTokens: number;
    /** Input audio tokens (for multimodal models). */
    inputAudioTokens: number;
    /** Cached input audio tokens. */
    inputCachedAudioTokens: number;
    /** Input text tokens. */
    inputTextTokens: number;
    /** Cached input text tokens. */
    inputCachedTextTokens: number;
    /** Input image tokens (for multimodal models). */
    inputImageTokens: number;
    /** Cached input image tokens. */
    inputCachedImageTokens: number;
    /** Total output tokens. */
    outputTokens: number;
    /** Output audio tokens (for multimodal models). */
    outputAudioTokens: number;
    /** Output text tokens. */
    outputTextTokens: number;
    /** Total session connection duration in milliseconds (for session-based billing like xAI). */
    sessionDurationMs: number;
};
export type TTSModelUsage = {
    type: 'tts_usage';
    /** The provider name (e.g., 'elevenlabs', 'cartesia'). */
    provider: string;
    /** The model name (e.g., 'eleven_turbo_v2', 'sonic'). */
    model: string;
    /** Input text tokens (for token-based TTS billing, e.g., OpenAI TTS). */
    inputTokens: number;
    /** Output audio tokens (for token-based TTS billing, e.g., OpenAI TTS). */
    outputTokens: number;
    /** Number of characters synthesized (for character-based TTS billing). */
    charactersCount: number;
    /**
     * Duration of generated audio in milliseconds.
     */
    audioDurationMs: number;
};
export type STTModelUsage = {
    type: 'stt_usage';
    /** The provider name (e.g., 'deepgram', 'assemblyai'). */
    provider: string;
    /** The model name (e.g., 'nova-2', 'best'). */
    model: string;
    /** Input audio tokens (for token-based STT billing). */
    inputTokens: number;
    /** Output text tokens (for token-based STT billing). */
    outputTokens: number;
    /** Duration of processed audio in milliseconds. */
    audioDurationMs: number;
};
export type InterruptionModelUsage = {
    type: 'interruption_usage';
    /** The provider name (e.g., 'livekit'). */
    provider: string;
    /** The model name (e.g., 'adaptive interruption'). */
    model: string;
    /** Total number of requests sent. */
    totalRequests: number;
};
/** Aggregate per-provider usage for the audio EOT detector. */
export type EOTModelUsage = {
    type: 'eot_usage';
    /** The provider name (e.g., 'livekit'). */
    provider: string;
    /** The model name (e.g., 'turn-detector-v1' for cloud, 'turn-detector-v1-mini' for local). */
    model: string;
    /** Total number of EOT prediction requests served. */
    totalRequests: number;
};
export type ModelUsage = LLMModelUsage | TTSModelUsage | STTModelUsage | InterruptionModelUsage | EOTModelUsage;
export declare function filterZeroValues<T extends ModelUsage>(usage: T): Partial<T>;
export declare class ModelUsageCollector {
    private llmUsage;
    private ttsUsage;
    private sttUsage;
    private interruptionUsage;
    private eotUsage;
    /** Extract provider and model from metrics metadata. */
    private extractProviderModel;
    /** Get or create an LLMModelUsage for the given provider/model combination. */
    private getLLMUsage;
    /** Get or create a TTSModelUsage for the given provider/model combination. */
    private getTTSUsage;
    /** Get or create an STTModelUsage for the given provider/model combination. */
    private getSTTUsage;
    private getInterruptionUsage;
    private getEotUsage;
    /** Collect metrics and aggregate usage by model/provider. */
    collect(metrics: AgentMetrics): void;
    flatten(): ModelUsage[];
}
//# sourceMappingURL=model_usage.d.ts.map