Cersei

Providers

13 built-in LLM providers — Anthropic, OpenAI, Google, Mistral, Groq, DeepSeek, xAI, Together, Fireworks, Perplexity, Cerebras, Ollama, OpenRouter.

Providers

Cersei supports 13 providers out of the box. Most use the OpenAI-compatible API format, which means adding a provider is just an env var — no new code.

Model String Format

provider/model

Pass this to the Agent builder or the Abstract CLI:

Agent::builder()
    .provider(cersei_provider::from_model_string("groq/llama-3.1-70b-versatile")?.0)
abstract "fix the tests" --model groq/llama-3.1-70b-versatile

Bare model names auto-detect the provider from known prefixes:

abstract "fix the tests" --model gpt-4o          # → openai
abstract "fix the tests" --model claude-sonnet-4-6  # → anthropic
abstract "fix the tests" --model gemini-2.0-flash   # → google

Model Router

use cersei_provider::from_model_string;

// Explicit: provider/model
let (provider, model) = from_model_string("openai/gpt-4o")?;

// Auto-detect from prefix
let (provider, model) = from_model_string("gpt-4o")?;

// List providers with valid auth
let available = cersei_provider::router::available_providers();

// List all known providers
let all = cersei_provider::router::all_providers();

Prop

Type


Anthropic

Claude models. Uses Anthropic's native API format (different from OpenAI).

API Basehttps://api.anthropic.com
Env VarANTHROPIC_API_KEY or ANTHROPIC_KEY
FormatAnthropic (native)
Default Modelclaude-sonnet-4-6

Models:

ModelContext WindowVisionThinkingTool Use
claude-opus-4-6200KYesYesYes
claude-sonnet-4-6200KYesYesYes
claude-haiku-4-5200KYesNoYes
export ANTHROPIC_API_KEY=sk-ant-...
abstract "fix the tests" --model anthropic/claude-sonnet-4-6
abstract "fix the tests" --model sonnet   # alias
let (provider, model) = from_model_string("anthropic/claude-sonnet-4-6")?;

OpenAI

GPT and o-series models.

API Basehttps://api.openai.com/v1
Env VarOPENAI_API_KEY
FormatOpenAI-compatible
Default Modelgpt-4o

Models:

ModelContext Window
gpt-4o128K
gpt-4-turbo128K
o1200K
o3200K
export OPENAI_API_KEY=sk-...
abstract "fix the tests" --model openai/gpt-4o
abstract "fix the tests" --model 4o   # alias

Google

Gemini models via the OpenAI-compatible endpoint.

API Basehttps://generativelanguage.googleapis.com/v1beta/openai
Env VarGOOGLE_API_KEY or GEMINI_API_KEY
FormatOpenAI-compatible
Default Modelgemini-3.1-pro-preview

Models:

ModelContext Window
gemini-3.1-pro-preview2M
gemini-3.0-flash1M
gemini-2.0-flash1M
gemini-2.0-pro1M
gemini-1.5-pro2M
export GOOGLE_API_KEY=AIza...
abstract "fix the tests" --model google/gemini-2.0-flash
abstract "fix the tests" --model gemini   # alias

Mistral

Mistral and Codestral models.

API Basehttps://api.mistral.ai/v1
Env VarMISTRAL_API_KEY
FormatOpenAI-compatible
Default Modelmistral-large-latest

Models:

ModelContext Window
mistral-large-latest128K
codestral-latest256K
export MISTRAL_API_KEY=...
abstract "fix the tests" --model mistral/mistral-large-latest
abstract "fix the tests" --model mistral   # alias

Groq

Llama, Mixtral, and other open models on Groq's inference hardware.

API Basehttps://api.groq.com/openai/v1
Env VarGROQ_API_KEY
FormatOpenAI-compatible
Default Modelllama-3.1-70b-versatile

Models:

ModelContext Window
llama-3.1-70b-versatile128K
llama-3.1-8b-instant128K
mixtral-8x7b-3276832K
export GROQ_API_KEY=gsk_...
abstract "fix the tests" --model groq/llama-3.1-70b-versatile
abstract "fix the tests" --model llama   # alias

DeepSeek

DeepSeek Chat and Coder models.

API Basehttps://api.deepseek.com/v1
Env VarDEEPSEEK_API_KEY
FormatOpenAI-compatible
Default Modeldeepseek-chat

Models:

ModelContext Window
deepseek-chat64K
deepseek-coder64K
export DEEPSEEK_API_KEY=sk-...
abstract "fix the tests" --model deepseek/deepseek-chat
abstract "fix the tests" --model deepseek   # alias

xAI

Grok models.

API Basehttps://api.x.ai/v1
Env VarXAI_API_KEY
FormatOpenAI-compatible
Default Modelgrok-2
export XAI_API_KEY=xai-...
abstract "fix the tests" --model xai/grok-2
abstract "fix the tests" --model grok   # alias

Together

Open-source models hosted by Together AI.

API Basehttps://api.together.xyz/v1
Env VarTOGETHER_API_KEY
FormatOpenAI-compatible
Default Modelmeta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
export TOGETHER_API_KEY=...
abstract "fix the tests" --model together/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo

Fireworks

Fast inference for open models.

API Basehttps://api.fireworks.ai/inference/v1
Env VarFIREWORKS_API_KEY
FormatOpenAI-compatible
Default Modelaccounts/fireworks/models/llama-v3p1-70b-instruct
export FIREWORKS_API_KEY=fw_...
abstract "fix the tests" --model fireworks/accounts/fireworks/models/llama-v3p1-70b-instruct

Perplexity

Search-augmented models.

API Basehttps://api.perplexity.ai
Env VarPERPLEXITY_API_KEY
FormatOpenAI-compatible
Default Modelllama-3.1-sonar-large-128k-online
export PERPLEXITY_API_KEY=pplx-...
abstract "fix the tests" --model perplexity/llama-3.1-sonar-large-128k-online

Cerebras

Wafer-scale inference.

API Basehttps://api.cerebras.ai/v1
Env VarCEREBRAS_API_KEY
FormatOpenAI-compatible
Default Modelllama3.1-70b
export CEREBRAS_API_KEY=csk-...
abstract "fix the tests" --model cerebras/llama3.1-70b

Ollama

Local models. No API key needed.

API Basehttp://localhost:11434/v1
Env Var(none)
FormatOpenAI-compatible
Default Modelllama3.1
ollama pull llama3.1
abstract "fix the tests" --model ollama/llama3.1

Ollama must be running locally on port 11434. No API key is required.


OpenRouter

Aggregator that proxies to multiple providers with a single key.

API Basehttps://openrouter.ai/api/v1
Env VarOPENROUTER_API_KEY
FormatOpenAI-compatible
Default Modelanthropic/claude-3.5-sonnet
export OPENROUTER_API_KEY=sk-or-...
abstract "fix the tests" --model openrouter/anthropic/claude-3.5-sonnet

Auto-Detection

When you pass a bare model name (no /), the router auto-detects the provider:

PrefixProvider
claude-*anthropic
gpt-*, o1*, o3*openai
gemini-*google
mistral-*, codestral-*mistral
deepseek-*deepseek
grok-*xai
llama*groq (if GROQ_API_KEY set), else together, else ollama

If no prefix matches, the router picks the first provider with a valid API key in the environment.

Aliases

The Abstract CLI supports short aliases:

AliasResolves To
opusanthropic/claude-opus-4-6
sonnetanthropic/claude-sonnet-4-6
haikuanthropic/claude-haiku-4-5
4o, gpt4oopenai/gpt-4o
geminigoogle/gemini-3.1-pro-preview
llamagroq/llama-3.1-70b-versatile
deepseekdeepseek/deepseek-chat
grokxai/grok-2
mistralmistral/mistral-large-latest

Adding Custom Providers

Any OpenAI-compatible endpoint works with the OpenAI provider directly:

let provider = OpenAi::builder()
    .base_url("https://my-custom-api.com/v1")
    .api_key("my-key")
    .model("my-model")
    .build()?;

let output = Agent::builder()
    .provider(provider)
    .tools(cersei::tools::coding())
    .run_with("fix the tests")
    .await?;

For the CLI, set a custom base URL in config:

# .abstract/config.toml
model = "gpt-4o"
provider = "openai"

Then override via environment:

OPENAI_API_KEY=my-key OPENAI_BASE_URL=https://my-custom-api.com/v1 abstract "fix the tests"

On this page