Run a local model with Ollama
Use a model that supports tool calls if you want Autolith to read files or run commands.
Start
ollama serveif Ollama is not running. Download the model in another terminal:ollama pull qwen3:8bAdd this form to
${XDG_CONFIG_HOME:-~/.config}/autolith/init.lisp:(register-openai-compatible-provider :name "local-ollama" :endpoint "http://127.0.0.1:11434/v1/chat/completions" :models '("qwen3:8b") :api-key-environment-variable "AUTOLITH_OLLAMA_KEY" :stream-usage-p nil)Set a nonempty key and start Autolith. Local Ollama ignores the key, so you can use
ollamaas the value.export AUTOLITH_OLLAMA_KEY=ollama autolith models | grep -Fx 'local-ollama/qwen3:8b' autolith --provider local-ollama --model qwen3:8b- Send a short prompt to check that the reply streams. Ask Autolith to list the files in the current directory to check tool calls.
Troubleshoot Ollama
- Unknown model. Run
ollama listand copy the exact ID into:models. - Rejected stream options. Set
:stream-usage-p nilas shown above. - Context limit is too small. Raise the limit on the server first. Then set
:modelsto a list such as'((:name "qwen3:8b" :context-window 32768)), using the limit you set on the server.