import type { Api, Model } from "@oh-my-pi/pi-ai"; import type { Settings } from "../config/settings.js"; /** Role-resolved model used by online tiny tasks (auto-thinking, titles). */ export interface OnlineTinyCandidate { role: string; model: Model; } /** * Collect unique online models for lightweight background tasks. * * Order: each requested role's primary, then canonical retry fallback chains * traversed transitively (so a hop onto B also consults B's own chain). * Disabling model fallback restricts attempts to the first resolvable primary, * unless `tryAllRoles` asks for the explicit role chain without configured * retry-chain expansion. */ export declare function collectOnlineTinyCandidates(roles: readonly string[], settings: Settings, availableModels: Model[], options?: { tryAllRoles?: boolean; }): OnlineTinyCandidate[]; /** * Expand one model's own `retry.fallbackChains` transitively. * * With a role hint, use the role's configured chain even when the role has no * configured primary, else the configured `default` chain, which roles that are * not model kinds inherit as in `collectOnlineTinyCandidates`. Only configured * chains apply: a role's built-in priority list never adds fallbacks, so a * retry cannot move to a model the user did not select. Model-keyed and * wildcard chains retain their precedence. * Without a role hint, consult only the configured model-keyed / wildcard / * matching-role keys that `resolveRetryFallbackChainKey` already selects. */ export declare function expandOnlineTinyModelFallbacks(model: Model, settings: Settings, availableModels: Model[], role?: string): Model[];