pub fn apply_query(models: Vec<Model>, query: &ModelListQuery) -> Vec<Model>Expand description
Apply a ModelListQuery to a model list, returning a filtered and sorted
copy.
§Filter rules
min_params/max_params: model’sparam_count_bmust fall within the range (inclusive).min_context/max_context: model’scontext_lengthmust fall within the range when it is set. Models without a context length are not excluded by a context range filter.quantizations: model’s quantization must match one of the listed values. Models with no quantization are excluded when this filter is active.tags: model must have all listed tags (AND semantics).min_speed/max_speed: model’sbenchmark_summary.latest_tg_tpsmust be within the range. Models with no benchmark data are excluded when either speed bound is active.
§Sort behaviour
Default: AddedAt Desc (most recently added first). When sorting by
LatestTgTps, models without benchmark data sort last in both
ascending and descending orders.