# Aider can connect to most LLMs

## Best models

Aider works best with these models, which are skilled at editing code:

- [Gemini 2.5 Pro](/content/docs/llms/gemini.html)
- [DeepSeek R1 and V3](/content/docs/llms/deepseek.html)
- [Claude 3.7 Sonnet](/content/docs/llms/anthropic.html)
- [OpenAI o3, o4-mini and GPT-4.1](/content/docs/llms/openai.html)

## Free models

Aider works with a number of **free** API providers:

- [OpenRouter offers free access to many models](https://openrouter.ai/models/?q=free), with limitations on daily usage.
- Google’s [Gemini 2.5 Pro Exp](/content/docs/llms/gemini.html) works very well with aider.

## Local models

Aider can work also with local models, for example using [Ollama](/content/docs/llms/ollama.html). 
It can also access local models that provide an [Open AI compatible API](/content/docs/llms/openai-compat.html).

## Use a capable model

Check [Aider’s LLM leaderboards](/content/docs/leaderboards/index.html) to see which models work best with aider.

Be aware that aider may not work well with less capable models. If you see the model returning code, but aider isn’t able to edit your files and commit the changes… this is usually because the model isn’t capable of properly returning “code edits”. 
Models weaker than GPT 3.5 may have problems working well with aider.
