pub async fn list_models(config: &Config) -> Result<()>Expand description
List available models across all backends (honors user config).
Read-only: a dead local server is reported, never resurrected — a
cloud-model user who stopped Ollama on purpose must be able to
enumerate without a surprise VRAM grab. A stopped server does not hide
the installed set: the on-disk manifest store answers for it
(FromDisk), labeled so the user knows the server will start on use.
§Errors
Only writing to stdout. Every “nothing to list” case — Ollama not
installed, installed but stopped with an unreadable store, installed with
no models, no configured remote providers — is Ok and prints what it
found, because a listing verb that exits nonzero because the answer is
empty is answering a different question.