Back to Eliza

Model Providers

packages/docs/model-providers.mdx

2.0.111.1 KB
Original Source

Eliza supports 18 inference backends. Five are bundled with every release (OpenAI, OpenRouter, Groq, Ollama, and Eliza Cloud); the remaining providers are on demand — they auto-install from the plugin registry when their API key or config is detected. The active backend is selected through canonical runtime routing on the connected server, not by ad hoc env toggles in the client.


Provider Reference

The table below is the complete list of supported provider plugins, sourced from Eliza's provider catalog.

<Note> Providers marked **bundled** are pre-installed with every Eliza release and load instantly. Providers marked **auto-install** are downloaded automatically the first time their API key is detected — no manual plugin install required. All providers auto-enable when their API key or config is present. </Note>
ProviderPlugin PackageEnv Variable(s)InstallNotes
Anthropic@elizaos/plugin-anthropicANTHROPIC_API_KEY or CLAUDE_API_KEYBundledRecommended. Claude models (Opus, Sonnet, Haiku).
OpenAI@elizaos/plugin-openaiOPENAI_API_KEYBundledGPT-4o, o1, o3, GPT-4.1.
Google Gemini@elizaos/plugin-google-genaiGOOGLE_API_KEY or GOOGLE_GENERATIVE_AI_API_KEYBundledGemini Pro, Flash, Ultra.
Google Antigravity@elizaos/plugin-google-antigravityGOOGLE_CLOUD_API_KEYOn demandGoogle Cloud / Vertex AI models.
Vercel AI Gateway@elizaos/plugin-vercel-ai-gatewayAI_GATEWAY_API_KEY or AIGATEWAY_API_KEYOn demandCanonical gateway to multiple providers.
OpenRouter@elizaos/plugin-openrouterOPENROUTER_API_KEYBundled100+ models behind one API key.
Groq@elizaos/plugin-groqGROQ_API_KEYOn demandUltra-fast inference (LPU).
xAI@elizaos/plugin-xaiXAI_API_KEY or GROK_API_KEYOn demandGrok models.
DeepSeek@elizaos/plugin-deepseekDEEPSEEK_API_KEYOn demandReasoning and code models.
Ollama@elizaos/plugin-ollamaOLLAMA_BASE_URLBundledLocal models. No API key needed. Requires a running Ollama server.
Local AI@elizaos/plugin-local-inferenceOn demandOffline GGUF models. No API key or server needed. Point MODELS_DIR at local model files.
MiniMax@elizaos/plugin-minimaxOn demandMiniMax language models. Configure via plugin entry.
Together AI@elizaos/plugin-togetherTOGETHER_API_KEYOn demandOpen-source model hosting.
Mistral@elizaos/plugin-mistralMISTRAL_API_KEYOn demandMistral and Mixtral models.
Cohere@elizaos/plugin-cohereCOHERE_API_KEYOn demandCommand R+ and embed models.
Perplexity@elizaos/plugin-perplexityPERPLEXITY_API_KEYOn demandSearch-augmented generation.
Zai@elizaos/plugin-zaiZAI_API_KEYOn demandz.ai models.
Eliza Cloud@elizaos/plugin-elizacloudELIZAOS_CLOUD_API_KEYBundledCloud-managed inference route. Can be selected independently from where Eliza itself is running.
<Info> For providers without dedicated plugins (DeepSeek, Mistral, Cohere, Together AI, Perplexity, MiniMax), use the **OpenRouter** plugin. OpenRouter provides canonical access to 200+ models from these providers and more through a single API key. See the [OpenRouter plugin reference](/plugin-registry/llm/openrouter) for model ID format. </Info>

How Provider Selection Works

Eliza uses a server-target-first model:

  1. Choose which server to use: local, Eliza Cloud, or a remote backend.
  2. Link any accounts the server may need, such as Eliza Cloud or OpenAI.
  3. Select the active inference route for llmText.

The connected server then resolves the effective provider from canonical runtime config:

  • deploymentTarget decides where the server runs
  • linkedAccounts decides which accounts are available
  • serviceRouting.llmText decides who handles inference

Provider plugins are still auto-enabled from the server environment when appropriate, but the client-facing source of truth is the server's runtime routing config, not a raw environment variable on its own.

Auto-enable flow

  1. On startup, Eliza scans your environment variables (from ~/.eliza/.env, shell environment, or eliza.json).
  2. If a recognized API key is found (e.g., ANTHROPIC_API_KEY), the corresponding provider plugin is automatically added to the plugin allowlist.
  3. The plugin is installed on demand if not already present (installed to ~/.eliza/plugins/installed/).
  4. The provider becomes available for model selection.

Explicit plugin configuration

You can also enable providers manually in ~/.eliza/eliza.json under the plugins key:

json5
{
  plugins: {
    allow: ["anthropic", "openai", "ollama"],
  },
}

To disable an auto-enabled provider, set its entry to enabled: false:

json5
{
  plugins: {
    entries: {
      anthropic: { enabled: false },
    },
  },
}

Auth profiles

Providers can also be activated through auth profiles in your config:

json5
{
  auth: {
    profiles: {
      main: {
        provider: "anthropic",
      },
      backup: {
        provider: "openrouter",
      },
    },
  },
}

Setting Up Providers

Create or edit ~/.eliza/.env:

bash
# Primary provider
ANTHROPIC_API_KEY=sk-ant-api03-...

# Additional providers
OPENAI_API_KEY=sk-...
OPENROUTER_API_KEY=sk-or-v1-...
GROQ_API_KEY=gsk_...

Option 2: Config file

Add keys directly in ~/.eliza/eliza.json:

json5
{
  env: {
    ANTHROPIC_API_KEY: "<ANTHROPIC_API_KEY>",
    OPENAI_API_KEY: "<OPENAI_API_KEY>",
  },
}

Option 3: Interactive setup

bash
eliza configure

This walks you through setting common environment variables including your preferred model provider.

<Warning> When using the config file approach, your API keys are stored in plaintext in `eliza.json`. The `.env` file approach keeps secrets separate from configuration and is easier to exclude from version control. </Warning>

CLI Commands

bash
eliza models             # list configured model providers and their status
eliza configure          # show provider status and env variable guide (read-only)

Setting the default model

In ~/.eliza/eliza.json, specify the model using provider/model format:

json5
{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-sonnet-4.6",
      },
    },
  },
}

Or switch mid-session using the /model chat command:

/model openai/gpt-5

Model Fallbacks

If your primary model is unavailable (rate limit, outage, billing issue), Eliza automatically tries the next option in the list. This keeps the agent responsive even when a single provider has problems.

json5
{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-sonnet-4.6",
        fallbacks: [
          "openai/gpt-5",
          "groq/openai/gpt-oss-120b",
        ],
      },
    },
  },
}

Fallbacks are tried in order. Each provider in the fallback chain must have its API key configured.


Using Multiple Providers

You can have multiple providers active simultaneously. Every provider whose API key is detected will be auto-enabled and available for selection.

A common setup:

bash
# ~/.eliza/.env

# Primary — high-quality reasoning
ANTHROPIC_API_KEY=sk-ant-api03-...

# Fast inference for simple tasks
GROQ_API_KEY=gsk_...

# Fallback — wide model selection
OPENROUTER_API_KEY=sk-or-v1-...

# Local — offline / privacy-sensitive work
OLLAMA_API_ENDPOINT=http://127.0.0.1:11434

With this setup, all four providers are available. You can set different models for different purposes:

json5
{
  agents: {
    defaults: {
      model: {
        primary: "anthropic/claude-sonnet-4.6",
        fallbacks: ["openrouter/anthropic/claude-sonnet-4.6"],
      },
      imageModel: {
        primary: "openai/gpt-5",
      },
    },
  },
}

Local Models with Ollama

Ollama lets you run models locally with no API key and full privacy. It does not require an API key — just a running Ollama server. For fully embedded local inference without any server, see the local models guide.

Setup

<Steps> <Step title="Install Ollama"> ```bash curl -fsSL https://ollama.com/install.sh | sh ``` </Step> <Step title="Create an Eliza-1 model"> ```bash ollama create eliza-1-9b -f packages/training/cloud/ollama/Modelfile.eliza-1-9b-q4_k_m ``` </Step> <Step title="Set the endpoint URL"> Add to `~/.eliza/.env`: ```bash OLLAMA_API_ENDPOINT=http://127.0.0.1:11434 ``` (`OLLAMA_BASE_URL` also works as an alias.) </Step> <Step title="Select the model"> In `~/.eliza/eliza.json`: ```json5 { agents: { defaults: { model: { primary: "ollama/eliza-1-9b", }, }, }, } ``` </Step> </Steps>

Ollama auto-enables as soon as OLLAMA_API_ENDPOINT (or the alias OLLAMA_BASE_URL) is set. If you are running Ollama on the default port locally, just set:

bash
OLLAMA_API_ENDPOINT=http://127.0.0.1:11434

To verify Ollama is running and reachable:

bash
curl http://127.0.0.1:11434/api/tags

For remote Ollama instances, point to your server's address instead.


Env Variable Quick Reference

Every env variable that triggers auto-enable, grouped by provider:

Env VariableProvider Activated
ANTHROPIC_API_KEYAnthropic
CLAUDE_API_KEYAnthropic
OPENAI_API_KEYOpenAI
GOOGLE_API_KEYGoogle Gemini
GOOGLE_GENERATIVE_AI_API_KEYGoogle Gemini
AI_GATEWAY_API_KEYVercel AI Gateway
AIGATEWAY_API_KEYVercel AI Gateway
GROQ_API_KEYGroq
XAI_API_KEYxAI
GROK_API_KEYxAI
OPENROUTER_API_KEYOpenRouter
OLLAMA_BASE_URLOllama
DEEPSEEK_API_KEYDeepSeek
TOGETHER_API_KEYTogether AI
MISTRAL_API_KEYMistral
COHERE_API_KEYCohere
PERPLEXITY_API_KEYPerplexity
ZAI_API_KEYZai
ELIZAOS_CLOUD_API_KEYEliza Cloud
ELIZAOS_CLOUD_ENABLEDEliza Cloud
<Tip> Some providers accept multiple env variable names for convenience (e.g., both `ANTHROPIC_API_KEY` and `CLAUDE_API_KEY` activate Anthropic). You only need to set one. </Tip> <Info> **Local AI** does not auto-enable via an environment variable. Enable it explicitly with `eliza plugins install local-ai` or by adding `"local-ai"` to `plugins.allow` in `eliza.json`. See the [local models guide](/guides/local-models) and [embedding configuration schema](/config-schema#embedding) for configuration. </Info>