import type { Response } from 'express'; import type { IncomingHttpHeaders } from 'http'; import type { HandlerContext } from './types.js'; import { type HttpErrorPayload } from '../utils/http-error-mapper.js'; import type { RouteErrorPayload } from '../../error-handling/route-error-hub.js'; export { hasSsePayload, sendPipelineResponse, type SsePayloadShape } from './handler-response-utils.js'; type RequestLogMeta = Record | undefined; export declare function nextRequestIdentifiers(candidate?: unknown, meta?: { entryEndpoint?: string; providerId?: string; model?: string; }): { clientRequestId: string; providerRequestId: string; }; export declare function nextRequestId(candidate?: unknown, meta?: { entryEndpoint?: string; providerId?: string; model?: string; }): string; export declare function logRequestStart(endpoint: string, requestId: string, meta?: RequestLogMeta): void; export declare function logRequestComplete(endpoint: string, requestId: string, status: number, body?: unknown, options?: { preserveTimingForUsage?: boolean; }): void; export declare function logRequestError(endpoint: string, requestId: string, error: unknown): void; export declare function respondWithPipelineError(res: Response, ctx: HandlerContext, error: unknown, entryEndpoint: string, requestId: string, options?: { forceSse?: boolean; }): Promise; export declare function resolveReportedRouteErrorHttpResponse(args: { routePayload: RouteErrorPayload; normalizedError: Error & Record; onReportError?: (error: unknown) => void; }): Promise; export declare function captureClientHeaders(headers: IncomingHttpHeaders | undefined): Record; export declare function captureRawRequestBodyForMetadata(payload: unknown): unknown; export declare function readRequestBodyMetadata(payload: unknown): Record | undefined; export declare function mergePipelineMetadata(requestBodyMetadata: Record | undefined, internalMetadata: Record): Record;