litellm/tests/test_litellm/proxy/utils
Devin AI 59b5921874 fix: strip null bytes from spend log payloads before PostgreSQL write
PostgreSQL rejects text containing \x00 with error 22P05. When a request
input contained null bytes (e.g. Perl stack traces), the spend log write
failed on every scheduler tick, causing sustained high CPU on RDS.

Add _strip_null_bytes() that recursively removes \x00 from all string
values in a spend log payload before it reaches Prisma create_many.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
2026-06-30 19:27:16 +00:00
..
helpers test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00
prisma_and_spend fix: strip null bytes from spend log payloads before PostgreSQL write 2026-06-30 19:27:16 +00:00
proxy_logging fix(guardrails): match policy-pipeline block response to direct guardrail attachment (#31421) 2026-06-26 14:25:10 -07:00
__init__.py test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00