import type { RoutingInstructionState } from '../routing-instructions.js';
import type { VirtualRouterEngine } from '../engine-legacy.js';
export declare function resolveSelectionPenalty(engine: VirtualRouterEngine, providerKey: string): number | undefined;
export declare function resolveInstructionProcessModeForSelection(engine: VirtualRouterEngine, providerKey: string, routingState: RoutingInstructionState): 'chat' | 'passthrough' | undefined;
export declare function resolveInstructionTarget(engine: VirtualRouterEngine, target: NonNullable<RoutingInstructionState['forcedTarget']>): {
    mode: 'exact' | 'filter';
    keys: string[];
} | null;
export declare function filterCandidatesByRoutingState(engine: VirtualRouterEngine, routes: string[], state: RoutingInstructionState): string[];
/**
 * 在已有候选路由集合上，筛选出真正挂载了 sticky 池内 providerKey 的路由，
 * 并按 ROUTE_PRIORITY 进行排序；同时显式排除 tools 路由，保证一旦进入
 * sticky 模式，就不会再命中独立的 tools 池（例如 glm/qwen 工具模型）。
 * 若候选集合中完全没有挂载 sticky key 的路由，则尝试在 default 路由上兜底。
 */
export declare function buildStickyRouteCandidatesFromFiltered(engine: VirtualRouterEngine, filteredCandidates: string[], stickyKeySet: Set<string>): string[];
