mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-15 00:22:53 +00:00
Add SecretRedactionFilter to scrub API keys, tokens, and credentials from all log records (messages, args, tracebacks, extra fields). - Enable redaction by default; opt out with LITELLM_DISABLE_REDACT_SECRETS=true - Redact patterns: sk-*, Bearer tokens, x-api-key values, base64 creds - Handle JSON formatter exception hooks and percent-style format args - Snapshot dict iteration to avoid RuntimeError during concurrent logging
Testing for litellm/
This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.
The point of this is to:
- Increase test coverage of
litellm/ - Make it easy for contributors to add tests for the
litellm/package and easily run tests without needing LLM API keys.
File name conventions
litellm/proxy/test_caching_routes.pymaps tolitellm/proxy/caching_routes.pytest_<filename>.pymaps tolitellm/<filename>.py