// models
Providers & failover
Connect one model or several. If a provider rate-limits or dies mid-task, Astra fails over automatically instead of getting stuck.
Supported providers
| Provider | Env var | Example models |
|---|---|---|
| OpenAI (ChatGPT) | OPENAI_API_KEY | gpt-4o, gpt-4.1, o4-mini |
| Anthropic (Claude) | ANTHROPIC_API_KEY | claude-sonnet-4-6, claude-opus-4-8, claude-haiku-4-5-20251001 |
| Groq | GROQ_API_KEY | llama-3.3-70b-versatile, llama-3.1-8b-instant |
| Google Gemini | GEMINI_API_KEY or GOOGLE_API_KEY | gemini-2.5-pro, gemini-2.5-flash |
| Free (OpenRouter) | OPENROUTER_API_KEY | free/* models — see below |
| Ollama (local) | — | Any model served at localhost:11434 |
Model refs use provider/model-id, e.g. anthropic/claude-sonnet-4-6, openai/gpt-4.1, or free/openrouter/free.
Free models (OpenRouter)
Free models use the :free suffix on OpenRouter. Availability changes often — Astra migrates retired slugs and retries fallbacks automatically. If a model fails, use /model openrouter/free to auto-pick a working free model.
| Model | Slug |
|---|---|
| Free auto (recommended) | openrouter/free |
| Llama 3.3 70B (free) | meta-llama/llama-3.3-70b-instruct:free |
| Qwen3 Coder (free) | qwen/qwen3-coder:free |
| Qwen3 Next 80B (free) | qwen/qwen3-next-80b-a3b-instruct:free |
| GPT-OSS 120B (free) | openai/gpt-oss-120b:free |
| Gemma 4 26B (free) | google/gemma-4-26b-a4b-it:free |
Retired slugs like deepseek/deepseek-r1:free are remapped automatically on load. The default provider/model is free/meta-llama/llama-3.3-70b-instruct:free.
Automatic model failover
When a request fails because the model or provider is unavailable — rate limit (429), quota exhausted, Groq tokens-per-minute limit, invalid/missing API key, decommissioned model, or a provider outage — the agent does not stop. It:
- Reports what happened, e.g.
openai/gpt-4o unavailable — 429 … Switching to groq/llama-3.3-70b-versatile and retrying… - Switches to the next connected model, preferring a different provider first (rate limits and quota are usually provider-wide), then other models on the same provider.
- Retries the same step (up to 3 model switches per turn).
If no connected model can serve the request, the error is shown and the turn ends cleanly — the agent never hangs. Failover applies everywhere: normal chat, Plan mode, boss workers, and multi-agent workers.