/**
 * Telemetry Handler Module
 *
 * Handles analytics, evaluation, performance metrics, and telemetry configuration.
 * Extracted from BaseProvider to follow Single Responsibility Principle.
 *
 * Responsibilities:
 * - Analytics creation and tracking
 * - Evaluation generation
 * - Performance metrics recording
 * - Cost calculation
 * - Telemetry configuration
 *
 * @module core/modules/TelemetryHandler
 */
import type { NeuroLink } from "../../neurolink.js";
import type { StreamOptions, AIProviderName, AnalyticsData, EnhancedGenerateResult, EvaluationData, TextGenerationOptions } from "../../types/index.js";
/**
 * TelemetryHandler class - Handles analytics and telemetry for AI providers
 */
export declare class TelemetryHandler {
    private readonly providerName;
    private readonly modelName;
    private readonly neurolink?;
    constructor(providerName: AIProviderName, modelName: string, neurolink?: NeuroLink | undefined);
    /**
     * Create analytics for a generation result
     */
    createAnalytics(result: EnhancedGenerateResult, responseTime: number, context?: Record<string, unknown>): Promise<AnalyticsData>;
    /**
     * Create evaluation for a generation result
     */
    createEvaluation(result: EnhancedGenerateResult, options: TextGenerationOptions): Promise<EvaluationData>;
    /**
     * Record performance metrics for a generation
     */
    recordPerformanceMetrics(usage: {
        inputTokens: number | undefined;
        outputTokens: number | undefined;
    } | undefined, responseTime: number): Promise<void>;
    /**
     * Calculate actual cost based on token usage and provider configuration.
     *
     * Uses the per-model pricing table first (which has accurate rates for
     * specific models like Claude on Vertex AI), then falls back to the
     * provider-level default cost from modelConfiguration.
     *
     * Previously this only used modelConfig.getCostInfo() which returns
     * provider-level defaults (e.g. Gemini rates for the "vertex" provider),
     * causing a ~1,780x under-estimate when the actual model was Claude Sonnet
     * on Vertex AI ($0.000060 vs $0.106895 for the same request).
     */
    calculateActualCost(usage: {
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
    }): Promise<number>;
    /**
     * Create telemetry configuration for Vercel AI SDK experimental_telemetry
     * This enables automatic OpenTelemetry tracing when telemetry is enabled
     */
    getTelemetryConfig(options: StreamOptions | TextGenerationOptions, operationType?: "stream" | "generate"): {
        isEnabled: boolean;
        functionId?: string;
        metadata?: Record<string, string | number | boolean>;
        recordInputs?: boolean;
        recordOutputs?: boolean;
    } | undefined;
    /**
     * Handle tool execution storage if available
     */
    handleToolExecutionStorage(toolCalls: unknown[], toolResults: unknown[], options: TextGenerationOptions | StreamOptions, currentTime: Date): Promise<void>;
}
