Skip to content

LLM Providers ​

DocIntel supports multiple LLM providers. Configure via the LLM__PROVIDER environment variable.

Supported providers ​

ProviderLLM__PROVIDER valueNotes
OpenAIopenaiDefault; uses ModelRegistry tiers
Azure OpenAIazureSet LLM__BASE_URL to your Azure endpoint
AnthropicanthropicClaude 3.x via tool-use mode
Google GeminigeminiVia Vertex AI or AI Studio
OllamaollamaSet 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.

TierCurrent modelUsed by profiles
FLAGSHIPgpt-5.6-solAEC, Contract
DEFAULTgpt-5.6-terraFinancial, Scientific, General
VISIONgpt-5.6-solImage / sketch parsing
NANOgpt-6-lunaHigh-volume, cost-sensitive extraction

OpenAI (default) ​

bash
LLM__PROVIDER=openai
LLM__API_KEY=sk-proj-...

Uses the OpenAI chat completions API. Model selection is automatic per profile via ModelRegistry.

Azure OpenAI ​

bash
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 ​

bash
LLM__PROVIDER=anthropic
LLM__API_KEY=sk-ant-...

Uses Claude via the Anthropic messages API with tool-use mode for structured extraction.

Google Gemini ​

bash
LLM__PROVIDER=gemini
LLM__API_KEY=your-gemini-key

Works with both Vertex AI and Google AI Studio endpoints.

Ollama (air-gapped) ​

bash
LLM__PROVIDER=ollama
LLM__BASE_URL=http://localhost:11434
LLM__MODEL=llama3.1:70b

For 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 ​

VariableDefaultDescription
LLM__TEMPERATURE0.0Lower = more deterministic extraction
LLM__MAX_TOKENS4096Max response tokens per LLM call
LLM__TIMEOUT_S60Per-call timeout in seconds

See Configuration → for the full reference.

Purple8 DocIntel v0.12.5 · Universal Document Intelligence · NVIDIA Inception Member · Red Hat Technology Partner.