LLM Providers
DocIntel supports multiple LLM providers. Configure via the LLM__PROVIDER environment variable.
Supported providers
| Provider | LLM__PROVIDER value | Notes |
|---|---|---|
| OpenAI | openai | Default; uses ModelRegistry tiers |
| Azure OpenAI | azure | Set LLM__BASE_URL to your Azure endpoint |
| Anthropic | anthropic | Claude 3.x via tool-use mode |
| Google Gemini | gemini | Via Vertex AI or AI Studio |
| Ollama | ollama | Set LLM__BASE_URL; air-gapped deployments |
Model Registry
All profiles reference models from the central ModelRegistry in config.py — never hardcoded strings. Upgrading the entire model stack is a four-line change.
| Tier | Current model | Used by profiles |
|---|---|---|
FLAGSHIP | gpt-5.6-sol | AEC, Contract |
DEFAULT | gpt-5.6-terra | Financial, Scientific, General |
VISION | gpt-5.6-sol | Image / sketch parsing |
NANO | gpt-6-luna | High-volume, cost-sensitive extraction |
OpenAI (default)
LLM__PROVIDER=openai
LLM__API_KEY=sk-proj-...Uses the OpenAI chat completions API. Model selection is automatic per profile via ModelRegistry.
Azure OpenAI
LLM__PROVIDER=azure
LLM__API_KEY=your-azure-key
LLM__BASE_URL=https://your-resource.openai.azure.com/Point LLM__BASE_URL at your Azure OpenAI resource endpoint. Ensure your deployment names match the model IDs in ModelRegistry, or override LLM__MODEL.
Anthropic
LLM__PROVIDER=anthropic
LLM__API_KEY=sk-ant-...Uses Claude via the Anthropic messages API with tool-use mode for structured extraction.
Google Gemini
LLM__PROVIDER=gemini
LLM__API_KEY=your-gemini-keyWorks with both Vertex AI and Google AI Studio endpoints.
Ollama (air-gapped)
LLM__PROVIDER=ollama
LLM__BASE_URL=http://localhost:11434
LLM__MODEL=llama3.1:70bFor fully air-gapped deployments with no external API calls. Pair with OCR__ENGINE=tesseract and SKETCH__ENGINE=local for a completely offline stack.
WARNING
Extraction quality with local models depends heavily on model size. We recommend ≥ 70B parameter models for production-quality extraction. Smaller models work for testing but may produce significantly more hallucinations.
Advanced settings
| Variable | Default | Description |
|---|---|---|
LLM__TEMPERATURE | 0.0 | Lower = more deterministic extraction |
LLM__MAX_TOKENS | 4096 | Max response tokens per LLM call |
LLM__TIMEOUT_S | 60 | Per-call timeout in seconds |
See Configuration → for the full reference.