Symptom
Apps calling the LiteLLM proxy get errors like this for one model name, sometimes for a few seconds and sometimes for minutes:
No deployments available for selected model, Try again in 60 seconds. Passed model=gpt-chat. pre-call-checks=False, allowed_model_region=n/a
Other model groups on the same proxy work. The provider itself may look healthy in its own portal.
The proxy did not call the provider and fail. It never picked a deployment, because every deployment in the model group was either in cooldown or filtered out by pre-call checks. That's good news: the cause is in the router state or config, not a provider outage.
How the router ends up with nothing to send to
| Cause | What you see | Typical trigger |
|---|---|---|
| All deployments in cooldown after 429s | Error follows a burst of RateLimitError in the logs | Quota exhausted on a single-deployment group |
| Cooldown after 401 / 404 | Error starts right after a key rotation or deployment rename | Wrong key, deleted Azure OpenAI deployment |
| Cooldown after timeouts (408) | Error under load, slow backend | Client or proxy timeout shorter than generation time |
| High failure rate | More than half of calls in the current minute failed | Flaky self-hosted backend |
| Pre-call checks filter every deployment | pre-call-checks=True in the message, long prompts | Prompt bigger than every deployment's context window, region restriction |
| Only one deployment in the group | Any single failure blocks the whole group | No redundancy or fallback configured |
Cooldowns apply to individual deployments, not the model group. With one deployment per group, one cooldown takes out the whole group.
Checks
1. Confirm which model group and which deployments
List what the proxy thinks the group contains. Use a key with access to the model:
export LITELLM_URL=https://llm-gateway.internal.example.com
export LITELLM_KEY=sk-admin-or-team-key
curl -s "$LITELLM_URL/v1/model/info" \
-H "Authorization: Bearer $LITELLM_KEY" |
jq '.data[] | select(.model_name=="gpt-chat") | {id: .model_info.id, model: .litellm_params.model, api_base: .litellm_params.api_base}'
If only one entry comes back, a single failure is enough to produce this error.
2. Run a real health check against the group
/health sends a test request to each deployment the key can see and splits the result into healthy and unhealthy endpoints:
curl -s "$LITELLM_URL/health?model=gpt-chat" \
-H "Authorization: Bearer $LITELLM_KEY" |
jq '{healthy: [.healthy_endpoints[].api_base], unhealthy: [.unhealthy_endpoints[] | {api_base, error}]}'
The error field usually names the real problem: AuthenticationError, NotFoundError, RateLimitError or a timeout.
Warning
/healthsends real completions to every deployment. Don't run it in a tight loop against paid or rate-limited backends during an incident, or you add to the 429s you're trying to clear.
3. Read the proxy logs around the first failure
The first error before the cooldown is what matters, not the "No deployments" errors after it:
kubectl logs deploy/litellm -n ai-gateway --since=30m |
grep -E "RateLimitError|AuthenticationError|NotFoundError|Timeout|cooldown" | head -50
For more detail, start a test instance with litellm --config config.yaml --detailed_debug and replay one request.
4. Test the provider directly
Skip the proxy and call the backend with the same key and deployment. For Azure OpenAI:
curl -s -o /dev/null -w "%{http_code}\n" \
"https://my-aoai.openai.azure.com/openai/deployments/gpt-4o-chat/chat/completions?api-version=2024-10-21" \
-H "api-key: $AZURE_OPENAI_KEY" -H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"ping"}],"max_tokens":5}'
401 means a key problem, 404 means the deployment name or api-version is wrong, and 429 means quota. Fix the backend first. A cooldown only hides the error.
Fix
Get traffic flowing now
If the backend works again (quota window reset, key fixed), cooldowns expire on their own. Check how long your cooldown_time is before you restart anything. The default is short (5 seconds in current releases; check your version's docs), but many configs set 30–120 seconds.
If cooldown state is held in Redis (because router_settings points at a Redis host for a multi-replica proxy), restarting one pod doesn't clear it. Wait out the cooldown or fix the cause.
Caution
Setting
disable_cooldowns: trueto "fix" the error sends every request to a backend that's failing. With 429s that becomes a retry storm. Only disable cooldowns for a group that has a single deployment and no fallback, and only once you know the backend is healthy.
Add redundancy and fallbacks
Give each important model group at least two deployments (for example, two regions) and a fallback group:
model_list:
- model_name: gpt-chat
litellm_params:
model: azure/gpt-4o-chat
api_base: https://aoai-swedencentral.openai.azure.com
api_key: os.environ/AOAI_SWC_KEY
- model_name: gpt-chat
litellm_params:
model: azure/gpt-4o-chat
api_base: https://aoai-francecentral.openai.azure.com
api_key: os.environ/AOAI_FRC_KEY
- model_name: gpt-chat-small
litellm_params:
model: azure/gpt-4o-mini
api_base: https://aoai-swedencentral.openai.azure.com
api_key: os.environ/AOAI_SWC_KEY
router_settings:
routing_strategy: simple-shuffle
enable_pre_call_checks: true
cooldown_time: 30
allowed_fails: 3
fallbacks:
- gpt-chat: [gpt-chat-small]
context_window_fallbacks:
- gpt-chat: [gpt-chat-long]
Fallbacks run in order and cover 429s, 5xx and other errors. context_window_fallbacks only fires on context-length errors.
Tune what counts as a failure
When allowed_fails isn't set, a 429, 401, 404 or 408 cools the deployment down immediately. Set allowed_fails (or a per-error policy) so one blip doesn't remove a deployment:
router_settings:
allowed_fails_policy:
RateLimitErrorAllowedFails: 100
ContentPolicyViolationErrorAllowedFails: 1000
InternalServerErrorAllowedFails: 5
retry_policy:
RateLimitErrorRetries: 2
TimeoutErrorRetries: 1
AuthenticationErrorRetries: 0
NotFoundErrorRetries: 0
BadRequestErrorRetries: 0
Content filter blocks are caused by the user's input, not the deployment, so give them a high allowed-fails value. Otherwise one user can cool down a healthy deployment for everyone.
Per-deployment overrides go under model_info, not litellm_params (that block is sent to the provider):
- model_name: gpt-chat
litellm_params:
model: hosted_vllm/llama-3.3-70b
api_base: http://vllm.inference.svc:8000/v1
model_info:
allowed_fails: 1
cooldown_time: 10
Fix pre-call check filtering
If the message shows pre-call-checks=True and only long prompts fail, the request is bigger than every deployment's context window. Add a context_window_fallbacks target with a larger window, or trim the prompt in the app. Check model_info.max_input_tokens on custom or self-hosted deployments. A wrong value there filters out deployments that would have worked.
Check timeouts
If the first errors are timeouts, the proxy is cutting off slow generations and treating them as failures. Set a timeout in litellm_params that fits your longest legitimate response. Older releases also counted client disconnects as deployment failures (fixed in later 1.x releases per the release notes). Upgrade if your logs show healthy deployments cooling down after client-side cancels.
Prevent it next time
- No single-deployment groups for production models. Use two deployments, or one deployment plus a fallback group.
- Alert on the first error, not the cooldown. Alert on the provider error rate per deployment (429, 401, 404) in your proxy metrics or logs.
- Share router state across replicas. With several proxy pods, configure Redis in
router_settingsso cooldowns and usage counters are shared. Otherwise each pod makes different routing decisions. - Test fallbacks with real errors in non-production. Recent proxy versions strip
mock_testing_fallbacksfrom incoming requests, so you can't trigger a fallback with a request flag. Point a staging deployment at a wrong key or deployment name and confirm the fallback serves the request. - Pin and read release notes. Cooldown defaults and how
allowed_failsis read have changed between 1.x releases. Names vary by version, so check the docs for the version you run before you copy settings. - Probe with liveness, not
/health. Use/health/livelinessand/health/readinessfor Kubernetes probes. They don't call providers.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get