export declare const LLM_TIMEOUT_MS = 30000;
export declare const LLM_MAX_RETRIES = 2;
export declare const DEFAULT_MAX_COST_USD = 2;
export declare const MODEL_PRICING: Record<string, {
    input: number;
    output: number;
}>;
export interface LlmResult {
    content: string;
    tokensInput: number;
    tokensOutput: number;
    costUsd: number;
    provider: "anthropic" | "openai" | "scaffold";
}
export interface GenerateOptions {
    model: string;
    systemPrompt?: string;
    maxTokens?: number;
    /** When true, non-JSON content triggers one retry then MalformedJsonError. */
    parseJson?: boolean;
}
export interface JournalLlmProvider {
    generate(prompt: string, options: GenerateOptions): Promise<LlmResult>;
}
export declare class CostCapExceededError extends Error {
    readonly runningCost: number;
    readonly cap: number;
    constructor(runningCost: number, cap: number);
}
export declare class MalformedJsonError extends Error {
    constructor(m?: string);
}
export declare class CostTracker {
    private readonly cap;
    private running;
    constructor(cap?: number);
    assertCanAfford(estimatedCost: number): void;
    recordActual(cost: number): void;
    getTotal(): number;
}
/** CQ14: ONLY site that reads provider env keys (returns env-var NAME). */
export declare function resolveCredentialsForModel(modelId: string): string | null;
export declare class AnthropicJournalProvider implements JournalLlmProvider {
    private readonly apiKey?;
    constructor(apiKey?: string | undefined);
    generate(prompt: string, opts: GenerateOptions): Promise<LlmResult>;
}
export declare class OpenAiJournalProvider implements JournalLlmProvider {
    private readonly apiKey?;
    constructor(apiKey?: string | undefined);
    generate(prompt: string, opts: GenerateOptions): Promise<LlmResult>;
}
export declare class ScaffoldFallbackProvider implements JournalLlmProvider {
    generate(_prompt: string, _opts: GenerateOptions): Promise<LlmResult>;
}
export declare function selectProvider(): JournalLlmProvider;
//# sourceMappingURL=journal-llm-client.d.ts.map