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
pub(super) const CONTROL: &str = "
CREATE TABLE IF NOT EXISTS compute_subscription_validations (
operation_id TEXT PRIMARY KEY REFERENCES operations(operation_id),
candidate_ref TEXT NOT NULL,
candidate_revision INTEGER NOT NULL CHECK(candidate_revision > 0),
record_json TEXT NOT NULL,
state TEXT NOT NULL CHECK(state IN ('staged','verified','retained','released')),
save_operation_id TEXT,
updated_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS compute_subscription_validations_candidate_idx
ON compute_subscription_validations(candidate_ref, candidate_revision, updated_at);
";