Skip to main content

pick_cheap_model

Function pick_cheap_model 

Source
pub fn pick_cheap_model(
    reg: &ModelRegistry,
    exclude: Option<&str>,
) -> Option<String>
Expand description

Pick the cheapest chat-capable model_ref for Smart background routing, excluding exclude (the agent’s own primary). Chat-capable = capabilities contains “chat” OR is empty (legacy entries assumed chat). None when no qualifying entry exists → caller keeps normal candidates (fail-expensive).