/**
 * Helpers for embedding providers when input exceeds model token limits.
 * Token counts use a chars/4 heuristic (conservative margin) — not exact tiktoken counts.
 */
export declare const DEFAULT_EMBEDDING_MAX_TOKENS = 8192;
export declare const DEFAULT_EMBEDDING_TOKEN_MARGIN = 128;
export type EmbeddingOverflowStrategy = 'chunk-mean' | 'truncate';
export interface EmbeddingOverflowConfig {
    embeddingMaxTokens?: number;
    embeddingOverflowStrategy?: EmbeddingOverflowStrategy;
}
export interface PrepareEmbeddingInputResult {
    input: string | string[];
    overflow: boolean;
    chunkCount: number;
    strategy: EmbeddingOverflowStrategy;
    estimatedTokens: number;
    chunks: string[];
}
export interface AggregateEmbeddingsResult {
    embedding?: number[];
    error?: string;
}
export declare function estimateTokenCount(text: string): number;
export declare function maxCharsForTokens(maxTokens: number): number;
export declare function getEffectiveMaxTokens(config?: EmbeddingOverflowConfig): number;
export declare function getOverflowStrategy(config?: EmbeddingOverflowConfig): EmbeddingOverflowStrategy;
export declare function splitTextForEmbedding(text: string, maxTokens: number): string[];
export declare function meanPoolEmbeddings(embeddings: number[][], weights?: number[]): number[];
export declare function prepareEmbeddingInput(text: string, config?: EmbeddingOverflowConfig): PrepareEmbeddingInputResult;
export declare function aggregateEmbeddingsFromResponse(data: {
    data?: Array<{
        embedding?: number[];
    }>;
}, expectedCount: number, strategy: EmbeddingOverflowStrategy): AggregateEmbeddingsResult;
export declare function buildEmbeddingOverflowMetadata(prepared: PrepareEmbeddingInputResult): Record<string, unknown> | undefined;
//# sourceMappingURL=textOverflow.d.ts.map