export type StreamAssembleResult = { status: "stored_ready"; completion: Record; } | { status: "not_storable"; reason: string; completion?: Record; } | { status: "incomplete"; reason: "stream_incomplete" | "stream_too_large" | "upstream_error" | "client_abort"; }; export declare function teeAndAssemble(opts: { upstreamBody: ReadableStream; onChunk: (bytes: Uint8Array) => void; maxBytes: number; signal?: AbortSignal; }): Promise; export declare function assembleSseText(sse: string, maxBytes: number): StreamAssembleResult; export declare function synthesizeHitSse(completion: Record, meta: { model?: string; id?: string; }): string;