Skip to content

feat(proxy): raise request body limit to 70MB for long LLM contexts - #127

Merged
argszero merged 1 commit into
mainfrom
feat/request-body-limit-70mb
Aug 23, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/request-body-limit-70mb

Conversation

@argszero

Copy link
Copy Markdown
Owner

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: enable limit feature on tower-http
  • src/main.rs: wrap router with RequestBodyLimitLayer::new(70 * 1024 * 1024)

The real payload ceiling remains governed by the upstream model's context window.

Verification

  • cargo check clean
  • cargo test: 142 passed, 0 failed
  • cargo fmt + clippy clean

Rant: 2026-08-22T23:20:00 (request body limit 70MB)

…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.
@argszero
argszero merged commit 7caf672 into main Aug 23, 2026
1 check passed
@argszero
argszero deleted the feat/request-body-limit-70mb branch August 23, 2026 04:40
@argszero argszero mentioned this pull request Aug 23, 2026
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>
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.

1 participant