import { LatencyTracker } from './LatencyTracker.js'; import { LLMResponse } from './types.js'; /** * Logger interface for ModelTimeout */ export interface ModelTimeoutLogger { info: (message: string, meta?: Record) => void; warn: (message: string, meta?: Record) => void; error: (message: string, meta?: Record) => void; } export declare const setModelTimeoutLogger: (logger: ModelTimeoutLogger) => void; export declare class ModelTimeoutError extends Error { readonly model: string; readonly timeoutMs: number; constructor(model: string, timeoutMs: number); } /** * Wrapper to add timeout to LLM calls with latency tracking */ export declare function callWithTimeout(model: string, call: (signal?: AbortSignal) => Promise, timeoutMs: number, latencyTracker?: LatencyTracker, stage?: string): Promise; /** * Build timeout fallback response */ export declare function buildTimeoutFallback(model: string): LLMResponse & { error: true; }; /** * Build model error response */ export declare function buildModelErrorResponse(model: string, message: string): LLMResponse & { error: true; }; /** * Run model call with optional delay before execution */ export declare function runModelCallWithDelay(delayMs: number, model: string, call: (signal?: AbortSignal) => Promise, timeoutMs: number, latencyTracker?: LatencyTracker, stage?: string): Promise; //# sourceMappingURL=ModelTimeout.d.ts.map