Providers and models
Providers overview
How Relief picks a model across your keys.
A provider is anything that serves models over an OpenAI compatible API, reached with your own key. Relief never sells you tokens and holds no keys of its own. You pay the provider directly, or use a free tier or a local model.
What is built in
| Provider | Key variable | Notes |
|---|---|---|
| OpenRouter | OPENROUTER_API_KEY | One key, many models, free models included. |
| DeepSeek | DEEPSEEK_API_KEY | Direct API with a balance check. |
| Gemini | GEMINI_API_KEY | Google AI Studio keys. |
| Groq | GROQ_API_KEY | Fast inference, free plan, two companies' models on one key. |
| OpenAI | OPENAI_API_KEY | Your own OpenAI API key. |
| Anthropic | ANTHROPIC_API_KEY | Your own Anthropic API key, through its OpenAI compatibility endpoint. This is an API key, never a Claude subscription login. |
| Ollama | none | Local models. Nothing leaves your machine. |
| Token Harbor | TOKEN_HARBOR_API_KEY | Free models on a shared gateway. frontier add token-harbor finds the free models for you. Its data policy is unknown, so keep personal data away from it. |
| AntSeed | none | A peer to peer network reached through a proxy on your machine (localhost:8377). frontier add antseed pins free sellers only. Its data policy is unknown. |
| Grok | XAI_API_KEY | xAI's paid API, added with frontier add grok. It is a paid lane. |
| Any OpenAI compatible API | you choose | Declared in settings. |
Free lanes
Groq, Gemini and OpenRouter each have a free plan with a daily limit, and Ollama runs on your own machine. Each free lane runs dry on its own clock, so one key of each is more room than one key alone. Add them in any order. Free models are unrated, and Relief shows how much of each lane is left. See What is left today. Under a free budget Relief tries the free lanes first and asks once before any paid lane. See Tiers and the quality floor.
frontier add <service> connects Token Harbor, AntSeed or Grok in one step: it finds the models, saves a backup of your settings, writes the entry and runs one test call. AntSeed was connected live on free sellers. Token Harbor and Grok are connected from their documented API shape and tested with stand ins, because no live Token Harbor or Grok key has been tried yet.
How the list is built
Relief builds one ordered list of providers each time it starts:
- OpenRouter, when
OPENROUTER_API_KEYis set and settings do not already name it. - Ollama, when
OLLAMA_MODELis set. - Every entry in
providersin your settings, in the order you wrote them. An entry whose key variable has no value is skipped. - Built in presets found from a key in the environment (DeepSeek, Gemini, Groq, OpenAI, Anthropic) that are not already named.
Then privacy rules remove providers you blocked. See Secrets and redaction.
How a request is routed
For each request Relief walks the tiers from the best allowed one down, and inside a tier it walks providers in list order. A model that answered 503 or 429 is skipped for routing.overloadCooldownSeconds (90 by default). A provider whose key is rejected, or whose daily quota is used up, is skipped for the rest of the session. Requests go one at a time by default, because bursts get accounts throttled. See Tiers and the quality floor.
Where keys live
Keys go in ~/.frontier/.env (written by frontier setup), or in real environment variables, which always win. Settings hold the name of the variable, never the key. Only that file can hold a key or a *_BASE_URL. A .env in the project you are working on is read only for harmless FRONTIER_ tunables, so a cloned repository cannot redirect your real key to another server. See Environment variables.
See what you have
/providers providers, their models, and account credit where the provider publishes it
/model every configured model, numbered; pick one
/cost tokens and estimated spend this sessionfrontier doctor sends one small real request to each provider and reports PASS, WARN or FAIL.