import type { ChatResponse, LLMToolDef, ONIModelMessage } from "../../models/types.js"; import type { AgentLoopConfig, LoopMessage } from "../types.js"; /** Check if an error is retryable (rate limits, transient server errors). */ export declare function isRetryableError(err: unknown): boolean; /** Get retry delay with exponential backoff. */ export declare function getRetryDelay(err: unknown, attempt: number): number; export interface InferenceResult { response: ChatResponse | null; /** Yielded messages during retries */ events: LoopMessage[]; succeeded: boolean; lastError: unknown; } /** * Run LLM inference with retry/timeout/header-aware backoff. * Returns the response and any yield-able events (retry messages). */ export declare function runInference(messages: ONIModelMessage[], llmTools: LLMToolDef[], systemPrompt: string, config: AgentLoopConfig, sessionId: string, turn: number): Promise; //# sourceMappingURL=inference.d.ts.map