lean_ctx/core/
model_router.rs1pub fn global_model_router() -> &'static std::sync::Mutex<ModelRouter> {
8 use std::sync::Mutex;
9 static ROUTER: std::sync::LazyLock<Mutex<ModelRouter>> =
10 std::sync::LazyLock::new(|| Mutex::new(ModelRouter));
11 &ROUTER
12}
13
14pub struct ModelRouter;
16
17impl ModelRouter {
18 pub fn select_model<'a>(&self, _task_class: &str, candidates: &'a [&str]) -> &'a str {
20 candidates.first().copied().unwrap_or("default")
21 }
22
23 pub fn record_outcome(&mut self, _model: &str, _task_class: &str, _accepted: bool, _cost: f64) {
25 }
26}