# Model Providers (https://www.agentenvframework.com/docs/model-providers)

> Model provider = The endpoint your agents and judges send their model calls to

## Supported Providers

| Provider                      | Serves                                       | Needs                       |
| ----------------------------- | -------------------------------------------- | --------------------------- |
| [LiteLLM](#litellm) (default) | the OpenAI and Anthropic APIs, for any model | a LiteLLM proxy and its key |
| [Hugging Face](#hugging-face) | the OpenAI API, for open models on the Hub   | a Hugging Face token        |

Agents and judges send every model call to the endpoint in `[model]`. Nothing is configured by
default.

## Picking a Provider

```toml title=".agentenv/config.toml"
[model]
base_url = "http://localhost:4000"
api_key  = "secret:litellm_api_key"

[model.roles]
agent = "claude-opus-5-5"
judge = "claude-sonnet-5-5"
```

`LITELLM_BASE_URL` and `LITELLM_API_KEY` override the file, and `--model` on `agent-env run`
changes the agent's model for one run.

### LiteLLM

```bash
pip install 'litellm[proxy]'
litellm --config litellm.yaml   # serves on port 4000
```

A [LiteLLM proxy](https://docs.litellm.ai/docs/simple_proxy) serves any model through one endpoint
that speaks both the OpenAI and Anthropic APIs, so every agent works through it. List your models in
`litellm.yaml` as its guide shows. Agents in a remote sandbox, such as Modal's, need a `base_url`
they can reach, not `localhost`.

### Hugging Face

```toml title=".agentenv/config.toml"
[model]
base_url = "https://router.huggingface.co/v1"
api_key  = "env:HF_TOKEN"

[model.roles]
agent = "zai-org/GLM-5.3"
judge = "openai/zai-org/GLM-5.3"   # a direct judge, use_agent_judge: false
```

The token needs the **Make calls to Inference Providers** permission. The router speaks only the
OpenAI API, so an agent built on the Anthropic SDK needs a LiteLLM proxy in front of it.
[Inference Providers](https://huggingface.co/docs/inference-providers) covers choosing models
and billing.