Repository navigation
Limit API request size without relying on a proxy - #364
Merged
Merged
Conversation
Deployments without a reverse proxy, such as managed container platforms or a direct agentloop server, read request bodies of any size into memory. The API now refuses bodies over AGENTLOOP_MAX_REQUEST_BYTES (default 16 MiB, 0 disables) with 413: declared lengths are checked before reading, and bodies without one are buffered only up to the limit before being replayed to the application. Invalid settings stop the server at startup. The cloud stack passes the setting through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
AgentLoop replay self-testThis required repository check evaluates generated synthetic demo traces. It tests the replay and CI machinery; it does not show that this PR improves application performance. AgentLoop CI Report
Performance Gates
Trace inputsThis comparison includes synthetic data. It does not establish application performance gains from a pull request.
Metric Impact
Top Findings
|
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.
The API read request bodies of any size into memory. The Caddy stack limits uploads at the proxy, but managed platforms (Cloud Run, App Runner, ...) and a direct `agentloop server` had no limit.
Behaviour change: uploads over 16 MiB to a server without a proxy now get 413 unless the limit is raised (changelog "Changed").
Tests: within limit, declared oversize, chunked oversize through FastAPI, disabled limit, setting parsing, and a 17 MiB upload to the real API app. Docs: PRODUCTION, CLOUD_DEPLOY, `.env.example`, changelog.
🤖 Generated with Claude Code