/**
 * Generates a short session title from conversation messages.
 * Supports three modes:
 * 1. Direct Anthropic API (default - uses Claude Haiku via api.anthropic.com)
 * 2. AI Gateway proxy (when aigw is configured - routes through the gateway)
 * 3. Custom naming model (user preference - any provider/model via the gateway)
 */
import { type ApiModel } from "./model-registry.js";
import type { PreferencesStore } from "./preferences-store.js";
/**
 * Pick a low-cost Claude model from the gateway to use as a naming model
 * when the user has no explicit `default.namingModel`. Prefers Haiku.
 * Returns the *stripped* id (no provider prefix) suitable for generateViaGateway,
 * or null if the gateway exposes no Claude-family model.
 */
export declare function pickFallbackAigwNamingModel(aigwUrl: string): Promise<string | null>;
export interface TitleGenOptions {
    /** Override model in "provider/modelId" format, e.g. "aigw/claude-haiku-4-5" */
    namingModel?: string;
    /** AI Gateway URL for proxying requests (used when provider is "aigw") */
    aigwUrl?: string;
    /** Thinking level for title generation: "off"|"minimal"|"low"|"medium"|"high"|"xhigh" */
    thinkingLevel?: string;
    /** Model to try when no explicit naming model is configured (usually default.sessionModel). */
    fallbackModel?: string;
    /** Preferences are needed to resolve and authenticate non-AI-Gateway naming models. */
    preferencesStore?: PreferencesStore;
    /** Test hook: supplies available models without reading preferences. */
    availableModels?: ApiModel[] | (() => Promise<ApiModel[]>);
    /** Test hook: performs the direct-model completion. */
    directModelCompleter?: (model: ApiModel, args: {
        systemPrompt: string;
        userPrompt: string;
        maxTokens: number;
        thinkingLevel: "off";
    }) => Promise<string | null>;
}
/**
 * Extract a title from model output. Strategy:
 *   1. Prefer the contents of the LAST `<title>...</title>` block (the prompt
 *      asks the model to wrap its answer this way; "last" tolerates models that
 *      include the tag literally in reasoning preamble).
 *   2. Fall back to the last non-empty short line (≤80 chars) of the response,
 *      which handles models that ignored the XML instruction but still placed
 *      a bare label at the end after some reasoning.
 *   3. Final fallback: the first line, matching legacy behaviour.
 */
export declare function cleanTitle(raw: string): string;
/**
 * Generate a short title for a session based on its messages.
 * Returns null if generation fails.
 */
export declare function generateSessionTitle(messages: any[], options?: TitleGenOptions): Promise<string | null>;
/**
 * Generate a 3-word summary of a goal title for sidebar display.
 * Returns the cleaned summary (without "New goal: " prefix - caller adds that).
 * Returns null if generation fails.
 */
export declare function generateGoalSummaryTitle(goalTitle: string, options?: TitleGenOptions): Promise<string | null>;
//# sourceMappingURL=title-generator.d.ts.map