AI Providers
erode supports three AI providers: Gemini (default), OpenAI, and Anthropic (experimental). Set the provider with the AI_PROVIDER environment variable.
Model tiers
Section titled “Model tiers”Each provider uses two model tiers to balance cost and quality:
- Fast model: Used for Stage 1 (component resolution) and Stage 2 (dependency scan). These are cheaper, faster models suited for extraction tasks.
- Advanced model: Used for Stage 3 (PR analysis) and Stage 4 (model generation). These are stronger models that handle the deeper architectural reasoning.
Default models
Section titled “Default models”Gemini
Section titled “Gemini”| Tier | Default model |
|---|---|
| Fast | gemini-2.5-flash |
| Advanced | gemini-2.5-flash |
OpenAI
Section titled “OpenAI”| Tier | Default model |
|---|---|
| Fast | gpt-4.1-mini |
| Advanced | gpt-4.1 |
Anthropic (experimental)
Section titled “Anthropic (experimental)”| Tier | Default model |
|---|---|
| Fast | claude-haiku-4-5-20251001 |
| Advanced | claude-sonnet-4-5-20250929 |
Overriding models
Section titled “Overriding models”You can override the default models with environment variables:
| Variable | Description |
|---|---|
GEMINI_FAST_MODEL | Gemini model for fast tier (Stages 1–2) |
GEMINI_ADVANCED_MODEL | Gemini model for advanced tier (Stages 3–4) |
OPENAI_FAST_MODEL | OpenAI model for fast tier (Stages 1–2) |
OPENAI_ADVANCED_MODEL | OpenAI model for advanced tier (Stages 3–4) |
ANTHROPIC_FAST_MODEL | Anthropic model for fast tier (Stages 1–2) |
ANTHROPIC_ADVANCED_MODEL | Anthropic model for advanced tier (Stages 3–4) |
Timeout configuration
Section titled “Timeout configuration”| Variable | Default |
|---|---|
GEMINI_TIMEOUT | 60000 ms |
OPENAI_TIMEOUT | 60000 ms |
ANTHROPIC_TIMEOUT | 60000 ms |
These control the maximum wait time for each API request. Increase them if you experience timeouts with large diffs.
Choosing a provider
Section titled “Choosing a provider”Gemini is the default provider and is generally cheaper per request. OpenAI offers strong analysis quality with broad model availability. Anthropic support is experimental.
Start with Gemini or OpenAI during evaluation.