Error category

LiteLLM Errors and Fixes

Fix LiteLLM proxy, gateway, virtual key, provider routing, budget, schema validation, and OpenAI-compatible API errors.

This LiteLLM troubleshooting hub collects real error signatures, quick fixes, common causes, and step-by-step debugging paths for developers who need a practical answer instead of a broad overview.

150 articles in this category.

Troubleshooting overview

Start by matching the exact error message, then check the technology, environment, credentials, network path, and deployment context. The pages below are grouped so you can move from broad LiteLLM symptoms to specific root-cause families without relying on client-side search.

Common error types

  • 401 authentication error
  • 429 budget exceeded
  • 400 bad request
  • model not found
  • provider rejection
  • validation error

Common causes

  • After upgrading to LiteLLM v1.84.0, Azure OpenAI model authentication completely breaks. LiteLLM is widely used as a unified LLM proxy, so this affects many production deployments. (1 page)
  • Reported 2026-05-14: Azure OAI models auth broken in LiteLLM v1.84.0. Multiple users affected. Regression in a paid proxy service. (1 page)
  • Claude Code using LiteLLM as proxy gateway; multi-turn conversations fail with 178 validation errors; blocks entire workflow (1 page)
  • Claude Code calling LiteLLM gateway returns API Error 400 with 178 validation errors. Input type mismatch: string_type validation fails on array input. Affects multi-turn conversations specifically. (1 page)
  • Claude Code users routing through LiteLLM gateway experience complete conversation hangs. The 178 validation errors suggest deep schema mismatch between Claude Code's expected format and LiteLLM's proxy translation. (1 page)
  • Open issue on BerriAI/litellm. Chinese-language report of Claude Code calls to LiteLLM gateway hanging on multi-turn conversations. Error: 178 validation errors with 'Input should be a valid string' — schema format mismatch. (1 page)

Related technologies

  • LiteLLM Proxy
  • OpenRouter (2 pages)
  • Anthropic API
  • OpenAI-compatible APIs
  • Bedrock

Troubleshooting clusters

  • Virtual key and authentication errors
  • Budget and rate limit errors
  • Provider routing errors
  • Schema and request validation errors
  • Proxy deployment errors
  • Model discovery errors

Latest pages in this category

Top fixes

High-intent troubleshooting topics

  • how to fix LiteLLM errors
  • LiteLLM error fix
  • LiteLLM troubleshooting
  • LiteLLM authentication failed
  • LiteLLM timeout
  • LiteLLM permission denied
  • LiteLLM deployment failed
LiteLLM LiteLLM

LiteLLM Proxy Returns Incorrect Tool Choice Error for Anthropic Adaptive-Thinking Models

Fix LiteLLM proxy errors when calling Anthropic adaptive-thinking models, where LiteLLM incorrectly forces tool_choice parameter and causes API requests to be rejected by Anthropic. Includes evidence for LiteLLM troubleshooting demand.

LiteLLM forces tool_choice parameter on adaptive-thinking Anthropic models (Claude Opus 4.7 etc.) causing request rejection — fix applied in pull #28114
LiteLLM OpenRouter

OpenRouter Model Routing Failure Returns Unclear Error When Model Unavailable

Diagnose and fix OpenRouter model routing errors when models return unclear failure messages, affecting production deployments using OpenRouter as a paid API proxy layer. Includes evidence for OpenRouter troubleshooting demand.

OpenRouter model routing returns ambiguous error when requested model is unavailable or disabled, without distinguishing between temporary unavailability and permanent deprecation
LiteLLM LiteLLM

LiteLLM IP Usage-Based Dynamic Priority Queuing (Fair Queuing)

Implement fair queuing in LiteLLM proxy to prevent single client from monopolizing model capacity and causing starvation for other tenants Includes evidence for LiteLLM troubleshooting demand.

No fair queuing — traffic burst from one client starves other clients' requests
LiteLLM LiteLLM

Fixing LiteLLM APIConnectionError: Connection timed out

Fix LiteLLM API connection timeout errors by adjusting request_timeout or retry settings Includes evidence for LiteLLM troubleshooting demand.

litellm.APIConnectionError: Request timed out. Please increase the max_retries parameter.
LiteLLM LiteLLM

LiteLLM Duplicate Usage Aggregation Across Monthly Billing Cycles

LiteLLM proxy admin sees usage data from end-of-month incorrectly carried over into next month's total, causing 'Month-to-Date' counter not to reset, leading to premature budget exhaustion Includes evidence for LiteLLM troubleshooting demand.

[Bug]: Duplicate Usage Aggregation Across Billing Cycles — April 30th tokens double-counted in May, pre-exhausting balances
LiteLLM LiteLLM

LiteLLM Proxy K8s Deployment OOMKill on Prisma Query Engine During Usage Stats Query

LiteLLM proxy admin running on Kubernetes finds that querying Usage page with large datasets triggers OOMKill on Prisma Query Engine, leaving proxy alive but unable to communicate with database Includes evidence for LiteLLM troubleshooting demand.

[Bug]: Prisma Query Engine unable to recover from OOMKill in K8s deployment — query-engine-de stuck in defunct state after large dataset access
LiteLLM OpenRouter

OpenRouter Free Models Keep Going 404 — Model Unavailable After Rate Limit

Developer using OpenRouter free tier encounters sudden 404 errors as models get removed, rate-limited, or replaced. Needs programmatic handling and fallback model rotation Includes evidence for OpenRouter troubleshooting demand.

Model claude-3-sonnet is not available / free LLMs on OpenRouter keep going 404
LiteLLM LiteLLM

LiteLLM Stream Tool Call Arguments Unbounded Memory Growth

Fix LiteLLM stream memory leak — prevent unbounded tool_call arguments accumulation during streaming Includes evidence for LiteLLM troubleshooting demand.

Unbounded memory growth in LiteLLM stream — current_tool_calls[i]['arguments'] += args_delta accumulates without limit
LiteLLM LiteLLM

LiteLLM Budget Bypass Security Vulnerability in Proxy

Fix LiteLLM proxy budget bypass vulnerability that allows users to exceed spending limits Includes evidence for LiteLLM troubleshooting demand.

Budget bypass vulnerability allowing unlimited spending in LiteLLM proxy (infinite money glitch)
LiteLLM LiteLLM

LiteLLM mid-stream fallback fails with HTTP 400 assistant prefill error on Claude models

Fix LiteLLM streaming fallback error: mid-stream fallback adds unsupported assistant prefill block, causing HTTP 400 on Claude Sonnet 4.6 / Opus 4.7 Includes evidence for LiteLLM troubleshooting demand.

litellm.BadRequestError: AnthropicException - {"type":"error","error":{"type":"invalid_request_error","message":"This model does not support assistant message prefill. The conversation must end with a user message."}}
LiteLLM LiteLLM

LiteLLM budget limits on keys cannot be removed once set via UI or API

Fix inability to remove budget limits from LiteLLM API keys once they have been configured, blocking billing flexibility Includes evidence for LiteLLM troubleshooting demand.

budget_limits on LiteLLM keys cannot be removed/overridden after initial set via UI or API
LiteLLM LiteLLM

LiteLLM Docker Start Fails for v1.84.0

Fix LiteLLM v1.84.0 Docker container failing to start Includes evidence for LiteLLM troubleshooting demand.

Docker image ghcr.io/berriai/litellm:1.84.0 start failure in container logs
LiteLLM LiteLLM

LiteLLM Azure OpenAI Authentication Error 401 with DefaultAzureCredential

Fix LiteLLM Azure OpenAI authentication error when using DefaultAzureCredential — works with direct OpenAI client but fails through LiteLLM proxy Includes evidence for LiteLLM troubleshooting demand.

litellm.AuthenticationError: AzureException AuthenticationError - Access denied due to invalid subscription key or wrong API endpoint
LiteLLM LiteLLM

LiteLLM OpenRouter Image Generation Fails with ImageUsage Validation Error (int_from_float)

Fix LiteLLM OpenRouter image generation failure with ImageUsage Pydantic validation error Includes evidence for LiteLLM troubleshooting demand.

Error transforming OpenRouter image generation response: 2 validation errors for ImageUsage output_tokens: Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=14417.92]

Browse all LiteLLM troubleshooting pages

Continue through the full static archive for this hub. Every listed page is crawlable and keeps its existing canonical URL.

Browse all LiteLLM troubleshooting pages