Skip to main content

LLM Providers

Dorgu can use large language models to enhance its application analysis. LLM integration provides deeper code understanding, framework-specific recommendations, smarter resource sizing, and security best practices tailored to your stack.
LLM enhancement is optional. Dorgu’s static analysis and manifest generation work without any LLM provider configured. The LLM layer adds refinements on top of the base analysis.

Two separate AI surfaces

Dorgu has two independent places where an LLM can run. They are configured separately, use different keys, and support different providers. This page covers the first.
Configuring a CLI provider does not enable the operator’s AI, and the operator’s key is never used by the CLI. Setting dorgu config set llm.provider anthropic gives you LLM-enhanced manifest generation and nothing else. To get AI diagnosis and AI remediation plans, configure the operator as described in AI setup.

Supported Providers

Override any of these with dorgu config set llm.model <model> or the llm.model key in .dorgu.yaml.

What LLM Enhances

When an LLM provider is configured, Dorgu uses it to improve several areas of analysis:
  • Deeper code analysis — understands business logic, not just file structure
  • Framework-specific recommendations — tailored settings for Express, Spring Boot, Django, etc.
  • Resource sizing — more accurate CPU/memory recommendations based on application patterns
  • Security best practices — context-aware security recommendations beyond generic defaults

OpenAI

Setup

Usage

Model Override


Anthropic

Setup

Usage


Gemini

Setup

Usage


Ollama

Ollama lets you run LLMs locally without an API key. You need a running Ollama instance with at least one model pulled.

Prerequisites

Setup

Usage

Ollama does not require an API key. The OLLAMA_HOST variable is only needed if your Ollama instance runs on a non-default address.

API Key Resolution Order

When Dorgu needs an API key, it checks the following sources in order:
  1. Environment variableOPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, or GOOGLE_API_KEY
  2. Global configllm.api_key in ~/.config/dorgu/config.yaml
  3. Interactive prompt — if running in a terminal and no key is found, Dorgu prompts you to enter one

Setting Provider in .dorgu.yaml

You can also set the LLM provider at the workspace or app level:
This is useful when different projects require different providers or models.

Next steps

Operator AI setup

The other AI surface: AI diagnosis and AI remediation plans, Anthropic only

Self-healing

What the operator’s AI planner receives and produces