Beyond the built-in OpenAI support, LLM can use virtually any model through its plugin system — including models that run entirely on your own hardware. Plugins add new model IDs toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/simonw/LLM/llms.txt
Use this file to discover all available pages before exploring further.
llm models and work seamlessly with all of LLM’s features: logging, templates, fragments, and conversations.
Installing Local Model Plugins
LLM plugins can provide local models that run on your machine without sending data to any external service.llm-ollama
Run any model available in Ollama, including Llama, Mistral, Phi, and Gemma families.
llm-mlx
Run Apple MLX models directly on Apple Silicon.
llm-llamafile
Run self-contained llamafile executables.
llm-gpt4all
17+ models from the GPT4All project.
llm install:
llm models will show the newly available models. Run prompts against them the same way as any other model:
OpenAI-Compatible Models
Many services and local inference servers expose an API that mirrors OpenAI’s interface. LLM can connect to any of them by adding entries toextra-openai-models.yaml.
Finding the Config Directory
~/Library/Application Support/io.datasette.llm. Create a file called extra-openai-models.yaml there.
Basic Configuration
model_id— the name LLM uses internally and on the command linemodel_name— the exact model name sent to the API (may differ to avoid clashes)api_base— the root URL of the OpenAI-compatible server
When
api_base is set, LLM does not send the configured openai API key by default.Using a Stored API Key
Setapi_key_name to the name of a key you have stored with llm keys set:
Capability Flags
| Key | Description |
|---|---|
completion: true | Use /completion endpoint instead of /chat/completion |
supports_tools: true | Model supports function / tool calling |
can_stream: false | Disable streaming for models that don’t support it |
supports_schema: true | Model supports JSON structured schema output |
vision: true | Model can accept images as attachments |
audio: true | Model can accept audio attachments |
Verifying the Setup
Extra HTTP Headers
Some providers (such as openrouter.ai) require custom HTTP headers on every request. Add them with theheaders: key:
headers: are passed verbatim on every API request to that model.