pub struct LlmClassifierRouteConfig {Show 19 fields
pub classifier_target: String,
pub mode: Option<ClassifierMode>,
pub strong_target: Option<String>,
pub weak_target: Option<String>,
pub base_threshold: Option<f64>,
pub threshold_step: Option<f64>,
pub fail_open: Option<bool>,
pub classify_trigger: ClassifyTrigger,
pub message_hash_fallback: bool,
pub recent_turn_window: Option<usize>,
pub prompt: Option<String>,
pub response_format_type: ClassifierResponseFormat,
pub max_output_tokens: u64,
pub escalation: Option<EscalationJudgeConfig>,
pub decision: Option<DecisionJudgeRouteConfig>,
pub models: Option<CategoryModelConfig>,
pub default_target: Option<String>,
pub response_schema: Option<String>,
pub policy: Option<ClassifierPolicyConfig>,
}Expand description
Settings for an llm_classifier route. Which fields are required depends on
the ClassifierMode; using a field from the wrong mode is an error.
Fields§
§classifier_target: StringTarget the judge is called through. Never a routing destination itself.
mode: Option<ClassifierMode>Mode to run. Defaults to escalation when escalation is set, otherwise capability.
strong_target: Option<String>Capability and escalation modes: the capable tier.
weak_target: Option<String>Capability and escalation modes: the efficient tier.
base_threshold: Option<f64>Capability mode: lowest solve probability that still routes to the weak target, from 0 to 1.
threshold_step: Option<f64>Capability mode: how much to raise the threshold when the judge is uncertain. Added once for an uncertain verdict and twice for unsupported.
fail_open: Option<bool>Capability mode: routes to the capable tier on judge client failures and deadlines. Defaults to true when capability mode is selected.
classify_trigger: ClassifyTriggerHow often the judge runs: every request, once per user turn, or once per session.
message_hash_fallback: boolReuses the session’s target by hashing the first user message when no
session ID is available. Needs classify_trigger = "new_session".
recent_turn_window: Option<usize>How many trailing turns the judge sees. Unset shows it the opening task and the latest user follow-up only.
prompt: Option<String>Replaces the packaged judge prompt. Required in custom mode.
response_format_type: ClassifierResponseFormatHow the judge is asked for structured output. Use json_object when the
provider cannot do JSON Schema.
max_output_tokens: u64Most completion tokens the judge verdict may use.
escalation: Option<EscalationJudgeConfig>Escalation mode: how many escalate verdicts latch the session, and how much of the transcript the judge sees.
decision: Option<DecisionJudgeRouteConfig>Capability mode: use a decision target as the judge, with relative-advantage scoring.
models: Option<CategoryModelConfig>Custom mode: runtime model groups.
default_target: Option<String>Custom mode: category used when the judge fails or its verdict cannot be routed.
response_schema: Option<String>Custom mode: JSON Schema the verdict must match, written as a string.
policy: Option<ClassifierPolicyConfig>Custom mode: how to read the chosen target out of the verdict.
Trait Implementations§
Source§impl Clone for LlmClassifierRouteConfig
impl Clone for LlmClassifierRouteConfig
Source§fn clone(&self) -> LlmClassifierRouteConfig
fn clone(&self) -> LlmClassifierRouteConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more