import type { Message } from '../../types/message/index.js'; /** * Maximum accumulated inline rich-content payload sent on one model request. * * Base64 is ASCII, so its JavaScript string length is also its encoded wire * payload length before the surrounding JSON. The bound deliberately counts * the encoded value rather than estimating decoded bytes: request gateways * reject the body they receive, not the file the body represents. */ export declare const DEFAULT_MAX_REQUEST_RICH_CONTENT_BYTES: number; export declare function resolveMaxRequestRichContentBytes(value: number | undefined): number; export interface RequestImageIdentity { readonly data: string; readonly mediaType: string; } /** * Build the provider-bound view of a conversation without editing history. * * User attachments and rich tool-result blocks share one oldest-first budget. * Tool messages and their `toolCallId` are never removed, so the projected * transcript retains its provider-valid call/result structure. Returning the * original array when nothing is omitted makes the no-op and exact-boundary * cases observable and keeps the common path allocation-free. */ export declare function projectRequestRichContent(messages: Message[], maxBytes: number): Message[]; /** Find the one distinct image in the exact provider-bound request, if one exists. */ export declare function findSingleRequestImage(messages: readonly Message[]): RequestImageIdentity | null; /** Build the one-off retry request without changing durable conversation state. */ export declare function projectRequestWithoutImage(messages: Message[], identity: RequestImageIdentity): Message[]; /** Persist a successful recovery while retaining exact image bytes. */ export declare function markProviderRejectedImage(messages: readonly Message[], identity: RequestImageIdentity): { readonly messages: Message[]; readonly count: number; }; //# sourceMappingURL=request-rich-content.d.ts.map