# Configuring LLM Providers

> Learn how to configure different LLM providers like OpenAI, Anthropic, Gemini, Azure, and Ollama for use with the Opik Agent Optimizer.

The Opik Agent Optimizer uses [LiteLLM](https://docs.litellm.ai/) under the hood, giving you access to 100+ LLM providers with a unified interface. This guide shows you how to configure different providers for both your **ChatPrompt** (the model that runs your prompt) and the **Optimizer** (the model that improves your prompt).

## Understanding the Two Model Types

When using the Opik Optimizer, there are two distinct models to configure:

| Model Type           | Purpose                                                         | Recommendation                                        |
| -------------------- | --------------------------------------------------------------- | ----------------------------------------------------- |
| **ChatPrompt model** | The model that executes your prompt during evaluation           | Use the same model as your production application     |
| **Optimizer model**  | The model that analyzes failures and generates improved prompts | Use the most capable model available for best results |

```python
from opik_optimizer import ChatPrompt, MetaPromptOptimizer