/**
 * Context Overflow Error Detection
 *
 * Cross-provider regex patterns to detect context window overflow errors.
 * Modeled on Cline + pi-mono patterns.
 */
/**
 * Check if an error is a context overflow error from any provider.
 */
export declare function isContextOverflowError(error: unknown): boolean;
/**
 * Identify which provider produced the context overflow error.
 */
export declare function getContextOverflowProvider(error: unknown): string | null;
/**
 * Extract actual token counts from provider overflow error messages.
 *
 * Many providers include the actual/max token counts in their error messages:
 * - OpenAI: "This model's maximum context length is 128000 tokens. However, your messages resulted in 145000 tokens."
 * - Anthropic: "prompt is too long: 180000 tokens > 200000 token limit"
 * - Google: "exceeds the maximum number of tokens (180000 > 100000)"
 */
export declare function parseProviderOverflowDetails(error: unknown): {
    actualTokens: number;
    budgetTokens: number;
} | null;
/**
 * Extract error message from various error formats.
 */
export declare function extractErrorMessage(error: unknown): string | null;
