Skip to main content

parse_models

Function parse_models 

Source
fn parse_models(body: &Value) -> Vec<CatalogModel>
Expand description

Map a GET /v1/models response body ({ "data": [ { id, display_name }, … ] }) to our catalog. display_name falls back to id when absent. Extracted from the network call so it is unit-testable without an outbound request.