Skip to main content

resolve_model_refs

Function resolve_model_refs 

Source
pub fn resolve_model_refs(
    profile: &AgentProfile,
    cfg: &ModelSwitchConfig,
    routed_primary: Option<String>,
) -> Vec<String>
Expand description

Build the ordered list of model_refs to try: [primary, ...fallback]. Priority per-agent → global. The primary is de-duplicated out of the chain (no point retrying the same ref back-to-back). Returns empty when nothing is configured, so the caller keeps today’s single-inline-model behaviour.