Add HTTP size limits
This commit is contained in:
@@ -36,6 +36,9 @@ Built-in defaults relevant to operations:
|
||||
- `schema_dir: .`
|
||||
- `server.addr: :8080`
|
||||
- `server.artifact_root`: unset; HTTP `file` input references are rejected until configured
|
||||
- `server.max_request_bytes: 16777216`
|
||||
- `server.max_artifact_bytes: 16777216`
|
||||
- `server.max_response_bytes: 16777216`
|
||||
- `defaults.render_format: text`
|
||||
|
||||
## Normal CLI Workflow
|
||||
@@ -78,6 +81,7 @@ Current inbound API behavior:
|
||||
- Validation content failures still return `200 OK` with `validation.status: "failed"`.
|
||||
- `inline` input references work without filesystem configuration.
|
||||
- `file` input references require `server.artifact_root` or `serve --artifact-root`; relative paths resolve inside that root and paths outside it are rejected.
|
||||
- Request bodies, HTTP file input artifacts, and encoded JSON responses are limited by `server.max_request_bytes`, `server.max_artifact_bytes`, and `server.max_response_bytes`.
|
||||
|
||||
Security caveat:
|
||||
|
||||
@@ -85,6 +89,13 @@ Security caveat:
|
||||
- Deploy only behind trusted controls (private network boundary, authenticated reverse proxy, API gateway, or equivalent).
|
||||
- Keep the HTTP artifact root as narrow as practical and do not make it writable by untrusted users.
|
||||
|
||||
Sizing guidance:
|
||||
|
||||
- Keep limits at the defaults unless a deployment has a measured need for larger prompt inputs or outputs.
|
||||
- Prefer `inline` inputs for small payloads and HTTP `file` inputs for larger local artifacts inside a controlled artifact root.
|
||||
- Increase the response limit when prompts intentionally return large generated artifacts or when clients request `include_raw_output`.
|
||||
- Set a limit to `0` only for trusted deployments where another layer enforces request and response size.
|
||||
|
||||
## Output, Logs, And Exit Codes
|
||||
|
||||
`run` command:
|
||||
|
||||
Reference in New Issue
Block a user