/**
 * Helper Model — lightweight LLM routing for grunt-work tasks.
 *
 * Routes tasks like cache planning, compaction, commit messages, etc. to a
 * cheaper/free model so expensive main models don't waste tokens on routine work.
 *
 * Resolution order:
 *   1. Per-provider helper (helper.providers.{currentProvider}.provider + model)
 *   2. Global helper (helper.globalProvider + helper.globalModel)
 *   3. Tool LLM (tools.llmProvider + tools.llmModel) — if configured
 *   4. Main model (fallback — not a true helper, but ensures the task runs)
 *
 * Design constraints:
 *   - Never throws from HelperModel.chat() — returns empty string on any error
 *   - Logs failures via logger.debug (non-fatal)
 *   - Singleton pattern — import `helperModel` for use
 *   - Tracks token usage separately from the main model
 */
import type { ConfigManager } from './manager.js';
import type { LLMProvider } from '../providers/interface.js';
import type { ProviderRegistry } from '../providers/registry.js';
/** Tasks that can be routed to a helper model. */
export type HelperTask = 'cache_strategy' | 'compaction' | 'intent_classify' | 'tool_summarize' | 'commit_message' | 'review_triage';
/** Resolved helper model: provider instance + model ID. */
export interface ResolvedHelper {
    provider: LLMProvider;
    modelId: string;
    /** true if using a dedicated helper, false if falling back to main model. */
    isHelper: boolean;
}
/** Options for helper model invocation. */
export interface HelperChatOptions {
    maxTokens?: number;
    systemPrompt?: string;
    /** If true, return empty string instead of falling back to main model. */
    helperOnly?: boolean;
}
/** Token usage tracking for helper model calls. */
export interface HelperUsage {
    inputTokens: number;
    outputTokens: number;
    calls: number;
}
export interface HelperModelDeps {
    readonly configManager: Pick<ConfigManager, 'get' | 'getCategory'>;
    readonly providerRegistry: Pick<ProviderRegistry, 'get' | 'getCurrentModel' | 'getForModel'>;
}
/**
 * HelperRouter — resolves which model to use for a given helper task.
 *
 * Resolution order:
 *   1. Per-provider helper (helper.providers.{currentProvider}.provider + model)
 *   2. Global helper (helper.globalProvider + helper.globalModel)
 *   3. Tool LLM (tools.llmProvider + tools.llmModel) — if configured
 *   4. Main model (fallback — not a true helper, but ensures the task runs)
 */
export declare class HelperRouter {
    private readonly deps;
    constructor(deps: HelperModelDeps);
    /**
     * Resolve the best helper for the given task.
     *
     * Returns null only if no provider can be resolved at all.
     */
    resolve(_task: HelperTask): ResolvedHelper | null;
}
/**
 * HelperModel — lightweight LLM interface for helper tasks.
 *
 * Callers own HelperModel lifetimes explicitly. Never throws — returns empty string on failure.
 * Tracks token usage separately from the main model.
 */
export declare class HelperModel {
    private readonly deps;
    private readonly router;
    private _usage;
    constructor(deps: HelperModelDeps);
    /**
     * Send a prompt to the helper model for the given task.
     *
     * @param task     The helper task type (for routing).
     * @param prompt   The user prompt to send.
     * @param options  Optional maxTokens, systemPrompt, helperOnly.
     * @returns        The assistant's text response, or empty string on failure.
     */
    chat(task: HelperTask, prompt: string, options?: HelperChatOptions): Promise<string>;
    /** Get cumulative helper usage since last reset. */
    getUsage(): Readonly<HelperUsage>;
    /** Reset usage counters. */
    resetUsage(): void;
}
//# sourceMappingURL=helper-model.d.ts.map