modelNames

Reads the model names from a model listing. It reads the System One shape, {"models": [{"name", ...}]}, and the OpenAI shape that Ollama serves, {"data": [{"id", ...}]}.

Return

the model names in the order listed

Parameters

body

the listing body

Throws

if the listing can't be read or a model has no name