pub struct RoutingPlan {
pub schema_version: String,
pub algorithm_version: String,
pub catalog: ModelCatalog,
pub requirements: RoutingRequirements,
pub bindings: RoutingBindings,
pub selections: Vec<RoutingSelection>,
}Expand description
Proof-carrying deterministic route plan for exactly one provider step.
Fields§
§schema_version: StringSchema version enforced against SCHEMA_VERSION.
algorithm_version: StringAlgorithm version enforced against ROUTING_ALGORITHM_VERSION.
catalog: ModelCatalogEmbedded model catalog governing candidate descriptors.
requirements: RoutingRequirementsHard budgets and requirements for the route decision.
bindings: RoutingBindingsNon-replayability bindings including state and side-effect watermarks.
selections: Vec<RoutingSelection>Deterministic reduction results, one per candidate, in preference order.
Implementations§
Source§impl RoutingPlan
impl RoutingPlan
Sourcepub fn build(
catalog: ModelCatalog,
requirements: RoutingRequirements,
bindings: RoutingBindings,
candidates: Vec<RoutingCandidate>,
) -> Result<Self, RoutingError>
pub fn build( catalog: ModelCatalog, requirements: RoutingRequirements, bindings: RoutingBindings, candidates: Vec<RoutingCandidate>, ) -> Result<Self, RoutingError>
Validates all inputs, builds candidate selections, and constructs the plan.
Sourcepub fn validate(&self) -> Result<(), RoutingError>
pub fn validate(&self) -> Result<(), RoutingError>
Validates schema, algorithm, catalog, requirements, bindings, and determinism.
Sourcepub fn digest(&self) -> Result<String, RoutingError>
pub fn digest(&self) -> Result<String, RoutingError>
Computes a canonical BLAKE3 digest over the validated plan JSON.
Sourcepub fn eligible_candidate_ids(&self) -> Vec<String>
pub fn eligible_candidate_ids(&self) -> Vec<String>
Returns candidate IDs in preference order where eligible is true.
Sourcepub fn selected_candidate_id(&self) -> Option<&str>
pub fn selected_candidate_id(&self) -> Option<&str>
Returns the ID of the single eligible candidate, or None if none.
Sourcepub fn minimum_eligible_context_tokens(&self) -> Option<u64>
pub fn minimum_eligible_context_tokens(&self) -> Option<u64>
Returns the smallest context boundary among candidates that may execute.
Trait Implementations§
Source§impl Clone for RoutingPlan
impl Clone for RoutingPlan
Source§fn clone(&self) -> RoutingPlan
fn clone(&self) -> RoutingPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more