import type { ClassifiedError } from '@cleocode/contracts'; /** * Classify an LLM API error into a structured {@link ClassifiedError}. * * Inspects the error object for: * - HTTP status code (`err.status`, `err.statusCode`, `err.response?.status`, * `err.cause?.status`) * - error type strings (`'rate_limit_error'`, `'overloaded_error'`, etc.) * - message regex matches (`context_length_exceeded`, `too large`, etc.) * * Returns a {@link ClassifiedError} with deterministic retry/rotate/fallback * flags that consumers use instead of re-inspecting the raw error. * * Provider-specific deep classification (Anthropic thinking-block signature * parsing, long-context tier gating) is intentionally omitted here — those * values exist in the taxonomy as hooks for future extension. * * @param err - The unknown error value caught from an LLM API call. * @param context - Optional provider and model identifiers for enrichment. * @returns A fully-populated {@link ClassifiedError}. * * @task T9270 */ export declare function classifyError(err: unknown, context?: { provider?: string; model?: string; }): ClassifiedError; //# sourceMappingURL=error-classifier.d.ts.map