import type { IAnthropicMessagesFailure, IAnthropicMessagesModel, TAnthropicMessagesErrorType } from './interfaces.js'; /** * A request this service refuses, in the Anthropic error shape. Callbacks throw it to answer with their * own status and message, for example an `authenticate` that refuses a credential with 401. */ export declare class AnthropicMessagesError extends Error { readonly failure: Readonly; constructor(statusArg: number, typeArg: TAnthropicMessagesErrorType, messageArg: string, detailsArg?: { retryAfterSeconds?: number; shouldRetry?: boolean; }, optionsArg?: ErrorOptions); } export declare const invalidRequest: (messageArg: string) => AnthropicMessagesError; /** The one wording an Anthropic client compacts its conversation on. */ export declare const promptTooLong: (detailArg: string) => IAnthropicMessagesFailure; /** * States a failure of a request in the Anthropic shape: a refusal a callback threw, the model's own dialect, * a usage or rate limit, a provider HTTP failure, and anything else as an `api_error` naming the error. */ export declare const describeFailure: (errorArg: unknown, modelArg?: IAnthropicMessagesModel) => IAnthropicMessagesFailure; export declare const failureBody: (failureArg: IAnthropicMessagesFailure, requestIdArg: string) => string; export declare const failureHeaders: (failureArg: IAnthropicMessagesFailure) => Record;