taketwo/llm-ollama

LLM plugin providing access to models running on an Ollama server

What it solves

The LLM command-line tool (by Simon Willison) is a versatile way to interact with language models, but it doesn't natively know about models hosted on an Ollama server. This plugin closes that gap: once installed, it automatically discovers every model available on an Ollama server and makes them usable directly from the LLM CLI. That means you can prompt, chat, embed, and more with any Ollama model — whether running on your own machine, a self-hosted server, or Ollama's hosted cloud — without leaving the familiar LLM workflow.

How it works

When you install the plugin, it connects to an Ollama server (by default a local one at localhost:11434, but you can point it elsewhere via environment variables). On every command, it fetches the list of models from that server and registers them with LLM under names prefixed with ollama/. For instance, a model named gemma3:latest becomes ollama/gemma3:latest, and it also gets a shorter alias ollama/gemma3 without the tag.

The plugin supports several model capabilities:

  • Attachments: Models that report vision can take images, and those that report audio can take WAV/MP3 files, via the standard LLM attachments syntax.
  • Tools: Models with tool support can use LLM's built-in tools, and the plugin adds two extra tools (ollama_web_search and ollama_web_fetch) that wrap Ollama's web search API (requires an API key).
  • Embeddings: Models with embedding capability work with the llm embed command. Input is truncated by default unless you set OLLAMA_EMBED_TRUNCATE=no.
  • Decision models: Some models answer with probabilities instead of text. The plugin passes a system prompt question and returns the result as JSON.
  • Reasoning: Thinking-capable models stream a reasoning trace separately. You can disable it entirely with -o think false or hide it from output with --hide-reasoning.
  • JSON schemas: You can use Ollama's structured output support via LLM schemas.
  • Async models: The plugin also registers async variants for use with Python's asyncio.

The plugin respects standard Ollama modelfile parameters (like temperature or context size) via -o name value. For cloud access, you set OLLAMA_HOST to the cloud endpoint and provide an API key.

Who it's for

This plugin is for anyone who already uses the LLM command-line tool and also runs models on Ollama — whether locally, on a remote machine, or in the cloud. It's ideal for developers and power users who want to use LLM's consistent interface to interact with a wide variety of models without switching tools. If you have an Ollama server up and running, this plugin transparently integrates its models into the LLM ecosystem.

Highlights

  • Automatic model discovery — all models on the server appear in LLM automatically, no manual config.
  • Concise aliases — :latest models get a shortened name without the tag.
  • Multimodal support — vision and audio attachments work out of the box for capable models.
  • Tool integration — including two extra web-search/fetch tools to reduce hallucination.
  • Embedding support — works with llm embed and adjustable truncation.
  • Reasoning control — fine-grained toggles for thinking steps.
  • Flexible server connections — local, remote (with auth or headers), or Ollama cloud.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Dispatch