% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api.R
\name{ollama_list_models}
\alias{ollama_list_models}
\title{List models available on a running Ollama server}
\usage{
ollama_list_models(
  base_url = getOption("llmcoder.ollama_url", "http://localhost:11434")
)
}
\arguments{
\item{base_url}{Character. Ollama base URL.  Defaults to the value of
\code{getOption("llmcoder.ollama_url", "http://localhost:11434")}.}
}
\value{
Character vector of model tag names, or \code{NULL} if Ollama is not
reachable.
}
\description{
Queries \code{GET /api/tags} on the local Ollama REST API and returns the names
of all installed models.  Useful for populating the model selector in the
Settings gadget.
}
\details{
Ollama must be running (\verb{ollama serve}) before calling this function.
Models are installed with \verb{ollama pull <model>} from the terminal.
}
\examples{
\dontrun{
ollama_list_models()
# [1] "llama3:latest"  "qwen2.5-coder:7b"  "mistral:latest"
}

}
