pub struct ModelSelection<'a> {
pub prompt: &'a Message,
pub history: &'a [Arc<Message>],
pub request_patch: Option<&'a RequestPatch>,
pub previous_model: Option<&'a ModelRef>,
pub default_model: &'a ModelRef,
pub selected_model: &'a ModelRef,
}Expand description
Model-selection event after completion-call hooks proceed and before request preparation inspects the selected model’s capabilities. The runner default is the initial candidate on every attempt, including retries; earlier selections in a stack update the candidate seen by later hooks.
Selection must be synchronous and non-blocking. Prepared attempts retain their
chosen handle. previous_model advances only when an operation is invoked,
including operations that fail, not on hook stops or preparation errors.
Fields§
§prompt: &'a MessagePrompt for the pending model call.
history: &'a [Arc<Message>]Canonical history visible to the pending model call.
request_patch: Option<&'a RequestPatch>Merged per-turn request patch from this step’s completion-call hooks (in hook registration order), when any hook patched the request.
previous_model: Option<&'a ModelRef>Model that executed the preceding issued attempt in this run, if any.
default_model: &'a ModelRefRunner default used as the initial candidate for this call.
selected_model: &'a ModelRefCandidate after all earlier model-selection hooks.