Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tee_gateway/controllers/ohttp_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@
_SSE_CONTENT_TYPE = "text/event-stream"

# Cap on the encapsulated request size. The inner payload is a chat-completion
# JSON body and may include base64 image attachments; 16 MiB covers roughly a
# 10 MiB raw image after base64/JSON overhead while still bounding enclave
# memory use for malicious or accidentally huge payloads.
_MAX_ENCAPSULATED_REQUEST_BYTES = 16 * 1024 * 1024
# JSON body and may include base64 image attachments; 20 MiB covers roughly a
# 14 MiB raw image — or several attached reference images — after base64/JSON
# overhead while still bounding enclave memory use for malicious or
# accidentally huge payloads.
_MAX_ENCAPSULATED_REQUEST_BYTES = 20 * 1024 * 1024

# Fields that can re-identify a client and have no role in inference. We drop
# them before forwarding to the inner handler — keeping them inside the
Expand Down
Loading