Fallback models
If your model is rate-limited, overloaded or unreachable, kunji can try another model automatically.
Set it up
Section titled “Set it up”kunji config set fallback '["groq:llama-3.3-70b-versatile", "ollama:llama3.2"]'kunji tries your model first, then each fallback in order:
! OpenAI rate limit or quota reached: … Trying fallback groq:llama-3.3-70b-versatileWhen it kicks in
Section titled “When it kicks in”| Situation | Falls back? |
|---|---|
| Rate limit or quota (HTTP 429) | Yes |
| Provider server error (5xx) or overloaded | Yes |
| Network problem (can’t connect) | Yes |
| Wrong or expired key (401/403) | No; fix the key |
| Model not found (404) | No; check the name |
| The answer had already started | No; you see an error instead |
Fallbacks without a saved key are skipped. A local Ollama model makes a good last fallback because it works offline.