Skip to main content

resolve

Function resolve 

Source
pub fn resolve(
    harness: &str,
    route: Option<&str>,
    model: Option<&str>,
    inherited: Option<&Choice>,
    key_present: impl Fn(&Route) -> bool,
) -> Result<Option<Picked>, String>
Expand description

The route and model a new agent runs on.

  • route names one: it must serve the harness, and model (or the route’s default) must be one it serves.
  • route is the harness’s own sign-in: no route, whatever the leader had.
  • route is absent: the leader’s route is inherited, and model picks a model on it.
  • Neither: no route; model is the harness’s own model choice, which the caller handles.

A picked route needs its key in the Vault; when it is not there the answer says what to ask for.