export interface ChatMessage {
    role: 'system' | 'user' | 'assistant';
    content: string;
}
export interface ChatOptions {
    temperature?: number;
    json?: boolean;
    timeoutMs?: number;
    maxTokens?: number;
}
export interface LlmClientOptions {
    baseUrl?: string;
    model?: string;
    apiKey?: string;
    defaultTimeoutMs?: number;
}
export declare class LlmClient {
    private readonly baseUrl;
    private readonly modelOverride;
    private readonly apiKey?;
    private readonly defaultTimeoutMs;
    /**
     * Resolved model id used in actual requests. Populated either from
     * the explicit override (env / constructor) or via a one-shot probe
     * of `GET /v1/models` against the configured base URL. The probe
     * keeps `npm run dev:full` working when the operator's env override
     * doesn't match what the backend actually has loaded.
     */
    private resolvedModel;
    /** Tag of the backend we resolved against — exposed for the settings UI. */
    resolvedBackend: 'llamacpp' | 'remote' | 'unknown';
    /**
     * Pure constructor — never reads process.env. Pass explicit opts
     * (typical production wiring is via `createDefaultLlmClient()`, which
     * collects env defaults). Keeping the constructor env-free makes the
     * class trivially mockable + test-isolated.
     */
    constructor(opts?: LlmClientOptions);
    /**
     * One-shot model discovery against `/v1/models`. Picks a sensible
     * default when the operator hasn't set `ROTHUNTER_LLM_MODEL` or when
     * the operator's override is no longer loaded on the backend.
     * Idempotent — repeat calls reuse `resolvedModel`.
     */
    private resolveModel;
    chat(messages: ChatMessage[], options?: ChatOptions): Promise<string>;
    /**
     * Issues a tiny completion to ensure the model is loaded into memory
     * and the first forward pass is compiled. Uses a short timeout
     * (5 s) so the orchestrator can detect "no LLM available" quickly
     * and skip the confirmation pass instead of spending the full
     * verdict timeout on every finding.
     *
     * Returns `true` on success, `false` on any failure — let the caller
     * decide whether to continue, retry, or fall back to deterministic
     * verdicts only.
     */
    warmup(): Promise<boolean>;
}
/**
 * Build an LlmClient from `ROTHUNTER_LLM_*` env vars (with the standard
 * fallback chain for the API key: ROTHUNTER_LLM_API_KEY →
 * OPENROUTER_API_KEY → OPENAI_API_KEY). All production call sites route
 * through here so env coupling lives in one place. Tests construct
 * `LlmClient` directly with explicit opts to bypass env reads.
 */
export declare function createDefaultLlmClient(): LlmClient;
//# sourceMappingURL=llm.d.ts.map