> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Providers

> Configure OpenAI, Anthropic, and Gemini

## Provider Comparison

| Provider | Models | Best For |
| - | - | - |
| **OpenAI** | gpt-4o, gpt-4o-mini, gpt-4-turbo | General purpose, cost-effective |
| **Anthropic** | claude-sonnet-4, claude-3-opus | Advanced reasoning, long context |
| **Gemini** | gemini-1.5-pro, gemini-pro | Multimodal, Google ecosystem |

***

## Configuration

**OpenAI**

**Environment:**

```bash theme={null}
export OPENAI_API_KEY=sk-...
```

**Config:**

```python theme={null}
from echo import LLMConfig, get_llm

llm_config = LLMConfig(
    provider="openai",
    model="gpt-4o-mini",
    temperature=0.2,
    max_tokens=2000,
)

llm = get_llm(llm_config)
```

**Models:** `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-3.5-turbo`

**Anthropic**

**Environment:**

```bash theme={null}
export ANTHROPIC_API_KEY=sk-ant-...
```

**Config:**

```python theme={null}
from echo import LLMConfig, get_llm

llm_config = LLMConfig(
    provider="anthropic",
    model="claude-sonnet-4-20250514",
    temperature=0.2,
    max_tokens=2000,
)

llm = get_llm(llm_config)
```

**Models:** `claude-sonnet-4-20250514`, `claude-3-opus-20240229`, `claude-3-haiku-20240307`

**Gemini**

**Environment:**

```bash theme={null}
export GOOGLE_API_KEY=...
```

**Config:**

```python theme={null}
from echo import LLMConfig, get_llm

llm_config = LLMConfig(
    provider="gemini",
    model="gemini-1.5-pro",
    temperature=0.2,
    max_tokens=2000,
)

llm = get_llm(llm_config)
```

**Models:** `gemini-1.5-pro`, `gemini-pro`, `gemini-pro-vision`

***

## Switching Providers

Change one line to switch providers:

```python theme={null}
# OpenAI
llm_config = LLMConfig(provider="openai", model="gpt-4o-mini")

# Anthropic
llm_config = LLMConfig(provider="anthropic", model="claude-sonnet-4-20250514")

# Gemini
llm_config = LLMConfig(provider="gemini", model="gemini-1.5-pro")
```

Agent code remains the same.

***

## LLMConfig Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `provider` | str | Required | `"openai"`, `"anthropic"`, `"gemini"` |
| `model` | str | Required | Model identifier |
| `temperature` | float | 0.7 | Randomness (0.0-1.0) |
| `max_tokens` | int | 4096 | Max response length |
| `max_iterations` | int | 5 | Max tool use iterations |

## Next Steps

> **[Streaming](https://developer.eka.care/docs/agents/agent-kit/streaming.md)**
>
> Real-time responses

> **[Examples](https://developer.eka.care/docs/agents/agent-kit/examples.md)**
>
> Complete examples


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.