docs: document MAX_REQUEST_BODY_SIZE_TO_REPAIR_MB env var - #424
Merged
Conversation
Document the new request-body repair size cap added in BerriAI/litellm#31497. The proxy's JSON repair fallback runs two full-body regex passes that block the event loop on large malformed payloads; this env var bounds the body size LiteLLM will attempt to repair before returning a 400. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Documents the new
MAX_REQUEST_BODY_SIZE_TO_REPAIR_MBenvironment variable introduced in BerriAI/litellm#31497, adding it to the proxy environment variables reference indocs/proxy/config_settings.md.Why
When the proxy fails to parse a request body as JSON, it falls back to a surrogate-repair path that runs two full-body regex passes to fix invalid surrogate escapes. On multi-MB malformed payloads that work blocks the event loop for hundreds of ms, which on single-worker pods stalls co-tenant requests. The new env var caps the body size LiteLLM will attempt to repair; above the cap it returns a 400 immediately, and bodies at or below it are repaired exactly as before. Default is 1MB, env-overridable, and set to 0 to disable the cap.
Source PR: BerriAI/litellm#31497 (LIT-3541).
🤖 Generated with Claude Code