Commit graph

1 commit

Author SHA1 Message Date
Roland Tannous
9a818e7155 studio: add normalize_gguf_quantization_method helper + tests
Introduce a pure helper that coerces Union[str, List[str]] inputs to
a lowercase, deduplicated list, rejecting empty lists via ValueError.
The ExportGGUFRequest.quantization_method field type is widened to
Union[str, List[str]] to accept batch inputs without breaking legacy
single-format callers.

The helper is the single point of normalization for the GGUF export
API boundary; routes/export.py will call it in the next commit.

Hermetic pytest at studio/backend/tests/test_export_gguf_batching.py
covers string-to-list wrapping, list lowercasing, order-preserving
dedup, empty-list rejection, and the three Pydantic-integration paths
(default, string input, list input).
2026-04-14 22:31:20 +04:00