/** * Base error class for all Unified LLM errors */ export declare class UnifiedLLMError extends Error { readonly code: string; constructor(message: string, code: string); } /** * Error thrown when authentication fails (missing or invalid API key) */ export declare class AuthenticationError extends UnifiedLLMError { readonly service: string; constructor(message: string, service: string); } /** * Error thrown when rate limiting occurs */ export declare class RateLimitError extends UnifiedLLMError { readonly retryAfter?: number | undefined; readonly service?: string | undefined; constructor(message: string, retryAfter?: number | undefined, service?: string | undefined); } /** * Error thrown when a requested model is not found */ export declare class ModelNotFoundError extends UnifiedLLMError { readonly model: string; readonly alternatives?: string[] | undefined; constructor(message: string, model: string, alternatives?: string[] | undefined); } /** * Error thrown when option validation fails */ export declare class ValidationError extends UnifiedLLMError { readonly field: string; readonly value?: unknown | undefined; constructor(message: string, field: string, value?: unknown | undefined); } /** * Error thrown when network connectivity fails */ export declare class NetworkError extends UnifiedLLMError { readonly cause?: Error | undefined; constructor(message: string, cause?: Error | undefined); } /** * Error thrown when response parsing fails */ export declare class ParsingError extends UnifiedLLMError { readonly originalContent: string; readonly parserType: string; constructor(message: string, originalContent: string, parserType: string); } /** * Error thrown when a request is aborted */ export declare class AbortError extends UnifiedLLMError { constructor(message?: string); } /** * Error thrown when a feature is not supported by the provider */ export declare class UnsupportedFeatureError extends UnifiedLLMError { readonly feature: string; readonly service: string; constructor(message: string, feature: string, service: string); } /** * Error code type for type-safe error handling */ export type ErrorCode = 'AUTH_ERROR' | 'RATE_LIMIT' | 'MODEL_NOT_FOUND' | 'VALIDATION_ERROR' | 'NETWORK_ERROR' | 'PARSING_ERROR' | 'ABORT_ERROR' | 'UNSUPPORTED_FEATURE'; /** * Type guard to check if an error is a UnifiedLLMError */ export declare function isUnifiedLLMError(error: unknown): error is UnifiedLLMError; /** * Type guard to check if an error has a specific error code */ export declare function hasErrorCode(error: unknown, code: ErrorCode): error is UnifiedLLMError; //# sourceMappingURL=errors.d.ts.map