Skip to content

docs: document MAX_REQUEST_BODY_SIZE_TO_REPAIR_MB env var - #424

Merged
mubashir1osmani merged 1 commit into
mainfrom
docs_max_request_body_size_to_repair
Jun 27, 2026
Merged

docs: document MAX_REQUEST_BODY_SIZE_TO_REPAIR_MB env var#424
mubashir1osmani merged 1 commit into
mainfrom
docs_max_request_body_size_to_repair

Conversation

@yassin-berriai

Copy link
Copy Markdown
Contributor

What

Documents the new MAX_REQUEST_BODY_SIZE_TO_REPAIR_MB environment variable introduced in BerriAI/litellm#31497, adding it to the proxy environment variables reference in docs/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

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>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Jun 27, 2026 4:42pm

Request Review

@mubashir1osmani
mubashir1osmani merged commit 450f32f into main Jun 27, 2026
2 checks passed
@mubashir1osmani
mubashir1osmani deleted the docs_max_request_body_size_to_repair branch June 27, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants