Built-in Providers

Built-in providers work with just ACR_PROVIDER and (for cloud providers) ACR_API_KEY — the endpoint URL, request format, and headers are resolved automatically. Selecting a provider in cgen config also sets its default model, which you can override with ACR_MODEL.

Run cgen model (or edit Model inside cgen config) to fetch the provider's current model catalog, search it, and persist a selection. Discovery uses short timeouts and bounded responses, authenticates with the configured credentials, and filters non-generation models when the provider exposes that metadata. OpenAI, Anthropic, Gemini, Groq, Grok, DeepSeek, OpenRouter, Mistral, Together, Fireworks, LM Studio, and Ollama support live discovery. Perplexity and CLI harnesses use manual model entry; leaving the model blank tells a CLI harness to use its own configured default.

ProviderDefault ModelAPI key
groq (default)llama-3.3-70b-versatilerequired
openaigpt-4o-minirequired
anthropicclaude-sonnet-4-20250514required
geminigemini-2.0-flashrequired
grokgrok-3required
deepseekdeepseek-chatrequired
openrouteropenai/gpt-4o-minirequired
mistralmistral-small-latestrequired
togethermeta-llama/Llama-3.3-70B-Instruct-Turborequired
fireworksaccounts/fireworks/models/llama-v3p3-70b-instructrequired
perplexitysonarrequired
lm_studioqwen/qwen3.5-35b-a3bnot needed (local)
ollamallama3not needed (local)
claude_codeharness defaultnot needed (Claude Code login)
codexharness defaultnot needed (Codex login)
opencodeharness defaultnot needed (OpenCode login)
gemini_cliharness defaultnot needed (Gemini CLI login)

lm_studio and ollama talk to a locally running server, so commit generation stays entirely on your machine.

Local CLI harnesses

The claude_code, codex, opencode, and gemini_cli providers invoke the corresponding executable already installed on PATH. Authenticate that CLI normally before using it with cgen. For example:

export ACR_PROVIDER=codex
export ACR_MODEL= # optional; leave blank to use the Codex default
cgen --dry-run

Harnesses run in non-interactive, read-only/plan mode and receive the commit prompt over standard input. They ignore ACR_API_KEY, ACR_API_URL, and ACR_API_HEADERS. gemini remains the direct Google API provider; gemini_cli invokes the locally installed Gemini CLI. Hyphenated claude-code and gemini-cli aliases are also accepted.

Custom providers

Set ACR_PROVIDER to any other name and provide ACR_API_URL. Custom providers default to the OpenAI-compatible request format, and both the URL and ACR_API_HEADERS support variable interpolation:

export ACR_PROVIDER=vllm
export ACR_API_URL=http://localhost:8000/v1/chat/completions
export ACR_MODEL=meta-llama/Llama-3-8B

For custom providers, cgen model derives /models only when the configured URL ends in the recognizable /chat/completions path. Other endpoint shapes fall back to current/default/manual selection rather than guessing a URL.

To make a provider available to everyone as a built-in, see Adding a New Default Provider — it's usually a 5-line change.