As of December, Ollama has support for structured outputs. ollamar supports this via the output and format arguments: https://hauselin.github.io/ollama-r/articles/ollamar.html#structured-outputs. It doesn't seem like llm_custom() has a way to access this feature currently.