v0.33.0
New: Body Capture
The new body_capture transform records decoded request bodies of matching hosts onto the audit log as body_capture.request_body and body_capture.request_body_truncated fields. Useful for auditing the payloads passing through the proxy (such as the prompts a sandbox sends to an LLM provider) without modifying upstream traffic. Thanks to @elenaxzhao for the contribution.
max_request_body_bytes caps how much of each body is captured; bodies larger than the cap are truncated to the prefix and body_capture.request_body_truncated is set to true. The cap defaults to 16 KiB and is independent of the global proxy.max_request_body_bytes limit. The transform is observation-only: it never rejects a request, and body read errors are annotated on the trace rather than failing the request. Response bodies are not captured.
Note: Captured bodies are written to the audit log in plain text. When
secretsruns withmatch_body: true, placebody_capturebeforesecretsso the audit log records the sandbox's proxy tokens rather than the real credentialssecretsswaps in.
transforms:
- name: body_capture
config:
max_request_body_bytes: 16384
rules:
- host: "api.anthropic.com"
methods: ["POST"]
paths: ["/v1/messages"]
- host: "api.openai.com"
methods: ["POST"]
paths: ["/v1/chat/completions"]