/** 上游返回非 2xx 状态码 */ export declare class UpstreamError extends Error { status: number; body: string; constructor(status: number, body: string); } /** 流式传输中断 */ export declare class StreamInterruptedError extends Error { reason: string; constructor(reason: string); } /** 网络层异常 */ export declare class NetworkError extends Error { cause: Error; constructor(cause: Error); } /** OpenAI 格式错误响应 */ export declare function formatOpenAIError(status: number, message: string, code?: string | number): { error: { message: string; type: string; code: string | number; }; }; /** Anthropic 格式错误响应 */ export declare function formatAnthropicError(type: string, message: string): { type: string; error: { type: string; message: string; }; }; //# sourceMappingURL=errors.d.ts.map