langsight investigate uses an LLM to analyse health evidence and produce root cause reports. You can choose from four providers.
Quick setup
Add aninvestigate block to .langsight.yaml:
Comparison
| Claude | OpenAI | Gemini | Ollama | |
|---|---|---|---|---|
| Free tier | No | No | ✅ 1,500/day | ✅ Unlimited |
| Data privacy | Anthropic | OpenAI | On your machine | |
| Context window | 200K | 128K | 1M | Varies |
| RCA quality | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ |
| Setup time | 2 min | 2 min | 2 min | 5 min |
Environment variables
| Provider | Variable | Where to get it |
|---|---|---|
| Claude | ANTHROPIC_API_KEY | console.anthropic.com |
| OpenAI | OPENAI_API_KEY | platform.openai.com/api-keys |
| Gemini | GEMINI_API_KEY | aistudio.google.com/app/apikey |
| Ollama | (none required) | — |
Rule-based fallback
If no provider is configured or the API call fails,langsight investigate automatically falls back to deterministic heuristics — no LLM needed.
Claude
Best quality RCA with adaptive thinking.
OpenAI
GPT-4o for teams already on OpenAI.
Gemini
Free tier, 1M context window.
Ollama
Local, free, air-gapped.