/** * Unwrap a backend error body for re-emission on a translated door. * * The Anthropic/Responses adapters run over the OpenAI-chat backend; when it * fails, its body is already an OpenAI error envelope. Re-wrapping that JSON * string as the `message` of a fresh `api_error` (the old behavior) both * double-encodes the message and misclassifies caller errors — a 400 * `invalid_request_error` from the backend must stay an * `invalid_request_error` on the door. */ export declare function unwrapUpstreamError(detail: string, options?: { readonly preserveMetadata?: boolean; }): { type: string; message: string; code?: string; param?: string; };