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
export type CodexMode = 'profile' | 'root';
export type CodexSurface = 'codex_cli' | 'codex_desktop';
/** Discovery facts remain stable when the user changes the connection mode. */
export function codexSurfaceFacts(mode: CodexMode, detected: readonly string[]) {
return (['codex_desktop', 'codex_cli'] as const).map(surface => ({
surface,
detected: detected.includes(surface),
applicable: mode === 'root' || surface === 'codex_cli',
}));
}