Add HTTP size limits
This commit is contained in:
@@ -147,6 +147,7 @@ Symptom:
|
||||
- CLI run/render error reading input artifacts.
|
||||
- HTTP `400 artifact_read_failed`.
|
||||
- HTTP `400 artifact_not_allowed`.
|
||||
- HTTP `413 artifact_too_large`.
|
||||
|
||||
Likely cause:
|
||||
|
||||
@@ -154,12 +155,14 @@ Likely cause:
|
||||
- Unsupported artifact reference type in HTTP request.
|
||||
- HTTP `file` input references are disabled because no artifact root is configured.
|
||||
- HTTP `file` input path escapes the configured artifact root.
|
||||
- HTTP `file` input artifact exceeds `server.max_artifact_bytes`.
|
||||
|
||||
Diagnostic step:
|
||||
|
||||
- Verify every mapped file path exists and is readable by the process.
|
||||
- For HTTP, verify each input uses supported `type` values.
|
||||
- For HTTP `file` inputs, verify `server.artifact_root` or `serve --artifact-root` is configured and the requested path stays inside that root.
|
||||
- For HTTP `file` inputs, compare file size to `server.max_artifact_bytes`.
|
||||
|
||||
Safe fix:
|
||||
|
||||
@@ -167,6 +170,7 @@ Safe fix:
|
||||
- Use supported input types (`file`, `inline`).
|
||||
- Configure a narrow HTTP artifact root when HTTP file inputs are required.
|
||||
- Use relative paths under the artifact root, or switch to `inline` inputs.
|
||||
- Increase `server.max_artifact_bytes` only when the deployment expects larger file inputs.
|
||||
|
||||
Relevant links:
|
||||
|
||||
@@ -351,22 +355,29 @@ Relevant links:
|
||||
Symptom:
|
||||
|
||||
- HTTP `400 invalid_json` or `400 invalid_request`.
|
||||
- HTTP `413 request_too_large`.
|
||||
- HTTP `413 response_too_large`.
|
||||
|
||||
Likely cause:
|
||||
|
||||
- Malformed JSON body.
|
||||
- Unknown JSON fields.
|
||||
- Missing required `prompt_id` or `inputs`.
|
||||
- Request body exceeds `server.max_request_bytes`, including inline input bodies.
|
||||
- Encoded JSON response exceeds `server.max_response_bytes`, including generated artifact body and optional raw model output.
|
||||
|
||||
Diagnostic step:
|
||||
|
||||
- Revalidate request JSON.
|
||||
- Confirm required request fields are present.
|
||||
- Compare request and expected response sizes to configured HTTP limits.
|
||||
|
||||
Safe fix:
|
||||
|
||||
- Send valid JSON with only supported fields.
|
||||
- Ensure `prompt_id` and at least one input mapping are included.
|
||||
- Use smaller inline inputs, move large local inputs under the artifact root, or increase `server.max_request_bytes`.
|
||||
- Omit `include_raw_output`, reduce generated output size, or increase `server.max_response_bytes`.
|
||||
|
||||
Relevant links:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user