pub struct CallModel {
pub algorithm: String,
pub request: Request,
pub models: Vec<ModelId>,
/* private fields */
}Expand description
An offloaded model call, surfaced inside Step::CallModel.
The host reads the public fields, performs (or delegates) the model call, and fulfills it
with respond — unblocking the algorithm’s Driver::call_model on the
other side. switchyard-llm-client’s run is the ready-made consumer that does this for
you.
Driver::call_model stamps the first candidate model onto the request before publishing
the call. A consumer that falls through to a later candidate must re-stamp it.
Fields§
§algorithm: StringThe name of the algorithm that produced this call, so a host instrumenting the calls it serves can attribute its own spans to the algorithm behind them.
request: RequestThe request to serve; its model is stamped with the first candidate.
models: Vec<ModelId>Candidate models, tried in order until one answers. Never empty.