import { type CapturedHttpErrorResponse, type RawHttpRequestDump } from "../utils/http-inspector"; /** Inputs that steer {@link formatMessage}'s formatter selection. */ export interface FormatMessageOptions { /** When present, the raw request is dumped into the message for 400-class failures. */ rawRequestDump?: RawHttpRequestDump; /** Captured non-2xx response body, appended to the message when available. */ capturedErrorResponse?: CapturedHttpErrorResponse; /** Provider id; gates provider-specific user-facing rewrites. */ provider?: string; } /** * Format a provider error into a user-facing message, unifying the three * formatters: lightweight retry-after extraction, the raw-dump finalizer, and * the copilot rewrite. * * Selection is driven by inputs, not a mode flag: a `rawRequestDump` routes * through {@link finalizeErrorMessage} (retry-after + raw dump + captured body), * otherwise the lightweight {@link formatErrorMessageWithRetryAfter} is used. */ export declare function formatMessage(error: unknown, opts?: FormatMessageOptions): Promise;