pub struct RouteMatch {
pub requires_tools: Option<bool>,
pub min_tools: Option<usize>,
pub thinking: Option<bool>,
pub min_reasoning_effort: Option<ReasoningEffort>,
pub stream: Option<bool>,
pub min_input_tokens: Option<u32>,
pub response_format: Option<ResponseFormatKind>,
}Expand description
Request-shape predicates a route can require beyond the model glob.
Every field is optional; an absent predicate is a wildcard, so an empty
block matches all requests. The trustworthy discriminators in real agent
loops are thinking / min_reasoning_effort / stream and the model name
itself — the full tool catalogue is typically resent on every step, so
requires_tools / min_tools are weak signals retained for completeness.
Fields§
§requires_tools: Option<bool>§min_tools: Option<usize>§thinking: Option<bool>§min_reasoning_effort: Option<ReasoningEffort>§stream: Option<bool>§min_input_tokens: Option<u32>§response_format: Option<ResponseFormatKind>Implementations§
Source§impl RouteMatch
impl RouteMatch
Sourcepub fn matches_request(&self, request: &CanonicalRequest) -> bool
pub fn matches_request(&self, request: &CanonicalRequest) -> bool
True when every set predicate holds for request; absent predicates are
ignored.
Sourcepub fn matched_predicates(&self) -> Vec<&'static str>
pub fn matched_predicates(&self) -> Vec<&'static str>
Names of the predicates that are set, in declaration order — the basis for the route-match audit descriptor.
Sourcepub const fn validate(&self) -> GatewayResult<()>
pub const fn validate(&self) -> GatewayResult<()>
Rejects predicate combinations that can never match: a zero min_tools
(vacuous), and requires_tools: false paired with a positive
min_tools (contradiction).
Trait Implementations§
Source§impl Clone for RouteMatch
impl Clone for RouteMatch
Source§fn clone(&self) -> RouteMatch
fn clone(&self) -> RouteMatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RouteMatch
Source§impl Debug for RouteMatch
impl Debug for RouteMatch
Source§impl Default for RouteMatch
impl Default for RouteMatch
Source§fn default() -> RouteMatch
fn default() -> RouteMatch
Source§impl<'de> Deserialize<'de> for RouteMatch
impl<'de> Deserialize<'de> for RouteMatch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for RouteMatch
impl JsonSchema for RouteMatch
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more