pub struct RouteConditions {
pub model_in: Vec<String>,
pub input_tokens_lt: Option<u32>,
pub input_tokens_gt: Option<u32>,
pub tag_equals: Option<String>,
pub has_images: Option<bool>,
pub has_audio: Option<bool>,
pub prompt_contains_any_of: Vec<String>,
pub estimated_cost_gt: Option<f64>,
pub estimated_cost_lt: Option<f64>,
}Expand description
Match conditions for a Route. v1 supports four predicates — extend
alongside tt_plan_core::types::RouteConditions so Plan and Gateway stay
in lockstep.
Fields§
§model_in: Vec<String>Match only if req.model is in this list. Empty list matches any model.
input_tokens_lt: Option<u32>Match only if estimated input_tokens < this.
input_tokens_gt: Option<u32>Match only if estimated input_tokens > this.
tag_equals: Option<String>Match only if ctx.tag == Some(this).
has_images: Option<bool>Match only if the request carries at least one image input part
(ContentPart::ImageUrl). Some(false) requires no image; None ignores.
has_audio: Option<bool>Match only if the request carries at least one audio input part
(ContentPart::InputAudio). Some(false) requires no audio; None ignores.
prompt_contains_any_of: Vec<String>Match if the request’s user+system text contains ANY of these keywords (case-insensitive substring). Empty = ignore.
estimated_cost_gt: Option<f64>Match only if the request’s estimated cost (USD) is greater than this.
Unknown cost (caller passed None) never matches a cost condition.
estimated_cost_lt: Option<f64>Match only if the request’s estimated cost (USD) is less than this.
Trait Implementations§
Source§impl Clone for RouteConditions
impl Clone for RouteConditions
Source§fn clone(&self) -> RouteConditions
fn clone(&self) -> RouteConditions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more