greybeard supports multiple LLM backends. Configure once with greybeard init or greybeard config set.
The default backend. Uses the OpenAI API.
Setup:
export OPENAI_API_KEY=sk-...
greybeard config set llm.backend openaiDefault model: gpt-4o
Other models:
greybeard config set llm.model gpt-4o-mini # cheaper, faster
greybeard config set llm.model gpt-4-turbo # older but capableUses the Anthropic API. Requires the optional anthropic extra.
Setup:
uv pip install "greybeard[anthropic]"
export ANTHROPIC_API_KEY=sk-ant-...
greybeard config set llm.backend anthropicDefault model: claude-3-5-sonnet-20241022
Other models:
greybeard config set llm.model claude-3-5-haiku-20241022 # faster, cheaper
greybeard config set llm.model claude-3-opus-20240229 # most capableRun any open-source model locally — no API key, no cost, fully offline.
Setup:
- Install Ollama
- Pull a model:
ollama pull llama3.2 - Start the server:
ollama serve - Configure greybeard:
greybeard config set llm.backend ollama
greybeard config set llm.model llama3.2Default base URL: http://localhost:11434/v1
Good models for review tasks:
| Model | Size | Notes |
|---|---|---|
llama3.2 |
3B | Fast, good for quick reviews |
llama3.1:8b |
8B | Better reasoning |
llama3.1:70b |
70B | Close to GPT-4 quality (needs good hardware) |
qwen2.5-coder:7b |
7B | Strong for code review |
mistral:7b |
7B | Good general purpose |
ollama pull llama3.2
greybeard config set llm.model llama3.2
git diff main | greybeard analyze!!! tip "Hiding verbose Ollama output" Ollama prints verbose initialization logs (GPU setup, model loading, etc.) and warnings to stderr. To hide these and only see greybeard's output:
**Option 1: Redirect stderr**
```bash
git diff main | greybeard analyze 2>/dev/null
```
**Option 2: Set Ollama's log level (recommended)**
```bash
# Add to your ~/.zshrc or ~/.bashrc
export OLLAMA_DEBUG=false
# Then restart Ollama
pkill ollama && ollama serve &
```
**Option 3: Shell alias**
```bash
# Add to your shell profile
alias gb='greybeard analyze 2>/dev/null'
# Then use:
git diff main | gb
```
Run models locally using LM Studio's built-in server — no API key required.
Setup:
- Download and install LM Studio
- Download a model from the Discover tab
- Start the local server (Local Server tab → Start Server)
- Configure greybeard:
greybeard config set llm.backend lmstudio
greybeard config set llm.model local-model # LM Studio uses this as a placeholderDefault base URL: http://localhost:1234/v1
!!! tip
LM Studio accepts any model name — use local-model or whatever your loaded model is named.
git diff main | greybeard analyze --model gpt-4o-mini
git diff main | greybeard analyze --model llama3.1:70bAny service that exposes an OpenAI-compatible API works:
greybeard config set llm.backend openai
greybeard config set llm.base_url https://my-proxy.example.com/v1
greybeard config set llm.api_key_env MY_PROXY_KEY