/**
 * Per-model thinking-level capabilities. Single source of truth shared
 * between the server (`src/server/`) and the UI (`src/app/`, `src/ui/`).
 *
 * Resolution order:
 *   1. If the model carries upstream per-model metadata (`thinkingLevelMap`),
 *      trust it for xhigh support.
 *   2. Otherwise fall back to Bobbit's family heuristics for sparse model
 *      payloads (notably AI Gateway / fallback persisted state).
 *
 * Base rules:
 *   - "off" is always supported.
 *   - "minimal"/"low"/"medium"/"high" are supported iff the model has
 *     `reasoning === true`.
 *   - Fallback heuristic: "xhigh" is supported by:
 *       • Anthropic Claude Opus 4.6+ (claude-opus-4-6, claude-opus-4.8, …)
 *       • OpenAI gpt-5.1-codex-max
 *       • OpenAI gpt-5.2* / gpt-5.4* / gpt-5.5*
 *
 * Clamping (`clampThinkingLevel`) steps **down** by rank to the next-lower
 * supported level when the requested level is unsupported. Unknown tokens
 * are treated as "off" before clamping, so on a non-reasoning model any
 * unknown input ends up as "off".
 */
export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh"];
export type ThinkingLevel = typeof THINKING_LEVELS[number];
/**
 * Minimal model shape consumed by capability detection. Mirrors the fields
 * present on both server `ApiModel` and the UI client `state.model`.
 */
export interface ModelLike {
    /** Model identifier, e.g. "claude-opus-4-7-20251101" or "gpt-5.2-codex". */
    id: string;
    /** Provider key, e.g. "anthropic", "openai", "aigw", "google". */
    provider?: string;
    /** Whether the model supports reasoning/thinking at all. */
    reasoning?: boolean;
    /** Optional upstream per-model effort metadata from pi-ai. */
    thinkingLevelMap?: Partial<Record<ThinkingLevel, string | null>>;
}
/** Test whether a value is one of the canonical thinking levels. */
export declare function isThinkingLevel(v: unknown): v is ThinkingLevel;
/**
 * Validate-or-drop. Returns the canonical level token if `value` is a known
 * thinking level (after trimming), else `undefined`. Does NOT consult any
 * model — clamping happens at use-time against a resolved model.
 */
export declare function isKnownThinkingLevel(value: unknown): ThinkingLevel | undefined;
/**
 * Whether the given model supports the "xhigh" thinking level.
 *
 * Prefer upstream per-model metadata when present (`thinkingLevelMap`) so
 * newly-added model families light up automatically without a Bobbit code
 * change. Fall back to id/provider heuristics for sparse payloads such as
 * AI Gateway discovery and persisted fallback state.
 */
export declare function supportsXHigh(m: ModelLike): boolean;
/**
 * Levels supported by the given model.
 *  - reasoning === false → only "off".
 *  - else → off, minimal, low, medium, high (+ xhigh iff `supportsXHigh`).
 *
 * If `reasoning` is undefined (legacy client state), default to true so
 * existing reasoning-capable selectors keep working; the server filters
 * non-reasoning models at the boundary via the registry-derived metadata.
 */
export declare function getSupportedThinkingLevels(m: ModelLike): ThinkingLevel[];
/**
 * Clamp a user-supplied level to one supported by the model.
 *
 *  - If `level` is supported by the model, returns it unchanged.
 *  - Else steps DOWN by rank (xhigh→high→medium→low→minimal→off) until
 *    a supported level is found. "off" is always supported so the walk
 *    always terminates.
 *  - Unknown strings become "off" first, then are clamped (which yields
 *    "off" on any model).
 *  - If `level` is undefined/empty AND `opts.allowEmpty` is true, returns
 *    `undefined` (used by role overrides / prefs that mean "inherit").
 */
export declare function clampThinkingLevel(level: string | undefined | null, m: ModelLike, opts?: {
    allowEmpty?: boolean;
}): ThinkingLevel | undefined;
//# sourceMappingURL=thinking-levels.d.ts.map