pub struct RoutedRequest {
pub request: Request,
pub decision: Arc<dyn Decision>,
pub default_client: Option<Arc<dyn RoutedLlmClient>>,
pub ctx: Context,
}Expand description
A request paired with the routing Decision that produced it — the offload
payload a host reads (via CallLlmRequest::get_routed) to serve the call.
The two model identifiers live in separate, unambiguous places: the model to
call is decision.selected_model(), while
request.llm_request.model is the inbound name the agent asked for (libsy
never overwrites it). A client maps selected_model() to the provider model
id it hits.
Fields§
§request: RequestThe request to serve; its model is the agent’s original name.
decision: Arc<dyn Decision>The routing decision behind this call; selected_model() is the model to hit.
default_client: Option<Arc<dyn RoutedLlmClient>>The client that serves this call by default, or None when the routed target
had no client. Rides along on the offloaded call so a host driving the stream
can serve it by default or override it with its own transport.
ctx: ContextThe request’s cross-cutting context, carried through the offload so whoever
serves the call (libsy’s own run, or a host driving the stream) hands it to
RoutedLlmClient::call.
Trait Implementations§
Source§impl Clone for RoutedRequest
impl Clone for RoutedRequest
Source§fn clone(&self) -> RoutedRequest
fn clone(&self) -> RoutedRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more