Repository navigation
feat(proxy): raise request body limit to 70MB for long LLM contexts - #127
Merged
Merged
Conversation
…rant 2026-08-22T23:20:00) axum default body limit is 2MB — insufficient for long LLM contexts and base64 images. Add tower-http 'limit' feature and wrap the router with RequestBodyLimitLayer(70MB). Real limit still governed by the upstream model context window. 142/142 tests + fmt + clippy green locally.
4 tasks done
argszero
added a commit
that referenced
this pull request
Aug 23, 2026
…0 / 2026-08-23T08:20:38) (#129) - Cargo.toml/Cargo.lock 0.7.9 -> 0.7.10 - ui/index.html cache-bust 20260822-9 -> 20260823-1 (5 refs) - CHANGELOG: v0.7.10 entry (70MB body limit #127 + P0 cache-billing fix #128) Gates: 145/145 cargo test + fmt + clippy + node --check all green. Co-authored-by: argszero <argszero@argszerodeMac-mini.local>
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.
Summary
Raise the HTTP request body limit from axum's default 2MB to 70MB.
Why
Long LLM contexts and base64 images exceed the default 2MB body limit (axum rejects with 413), breaking proxy use-cases for large payloads.
Changes
Cargo.toml: enablelimitfeature ontower-httpsrc/main.rs: wrap router withRequestBodyLimitLayer::new(70 * 1024 * 1024)The real payload ceiling remains governed by the upstream model's context window.
Verification
cargo checkcleancargo test: 142 passed, 0 failedcargo fmt+clippycleanRant: 2026-08-22T23:20:00 (request body limit 70MB)