Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Rust ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrusttask-routingtauri
/** Keep existing order (including temporarily unavailable identities), append newly chosen IDs. */
export function reconcileSelection(previous: readonly string[], selected: readonly string[]): string[] {
const retained = new Set(selected);
return [...new Set([...previous.filter(id => retained.has(id)), ...selected])];
}