The three LLM tiers
| Task | Env var | Volume | Recommended model |
|---|---|---|---|
| Semantic diff — summarizes what changed in a commit or PR | LLM_PROVIDER | Low — once per commit | Claude Sonnet or GPT-4o |
| Ticket analysis — relevance scoring, criteria mapping | ANALYSIS_LLM_PROVIDER | Medium — once per analysis run | GPT-4o-mini or Claude Haiku |
| Symbol summarization — one call per function/class at index time | SYMBOL_LLM_PROVIDER | High — thousands of calls for a typical repo | Claude Haiku or GPT-4o-mini |
SYMBOL_LLM_PROVIDER falls back to ANALYSIS_LLM_PROVIDER, which falls back to LLM_PROVIDER. You can start with just LLM_PROVIDER to get everything working, then add the cheaper tiers later to reduce costs.
Provider setup
- Anthropic
- OpenAI
- Ollama
Set up Waterline to use Claude for all three tiers. Using Claude Haiku for symbol summarization dramatically reduces your indexing cost compared to Sonnet.
Anthropic does not provide an embedding API. Even when you use Claude for all LLM tasks, you must also set
OPENAI_API_KEY and configure the embedding variables:Recommended split: Claude + OpenAI
This is the configuration used in production for the Waterline hosted version. Claude Haiku handles the high-volume symbol summarization at low cost, GPT-4o-mini handles analysis tasks, and Claude Sonnet handles the low-volume semantic diff work where quality matters most.Cost optimization tips
SYMBOL_LLM_PROVIDERdrives the most LLM spending during a first-time index. Always point it at the cheapest capable model — Claude Haiku and GPT-4o-mini both work well.LLM_PROVIDER(semantic diff) runs infrequently. This is the right place to use a higher-quality model without worrying about cost.- You can skip the analysis and symbol tier variables entirely when starting out. Set only
LLM_PROVIDERand come back to split the tiers once your bill gives you a reason to. - For
REPO_MAX_FILESandREPO_MAX_SYMBOLS, see the environment variables reference — these limits cap how many LLM calls a single repo index can trigger.