Skip to main content

validate_capability

Function validate_capability 

Source
pub fn validate_capability(
    when: &RouteConditions,
    then: &RouteAction,
    lookup: impl Fn(&str) -> Option<ModelInfo>,
) -> Result<(), ValidationError>
Expand description

When the route requires image or audio input, the target must be Vision-capable (the runtime guard sets vision=true for both). An unknown target (lookup returns None) is permissive, matching the runtime guard.