mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-30 14:25:06 +00:00
* fix: redaction headers ignored when sent via proxy When requests go through the proxy, `litellm_params["litellm_metadata"]` is always set (even when `None`), so `get_metadata_variable_name_from_kwargs` always returns "litellm_metadata". The redaction code then reads `None` instead of the actual metadata dict that contains the headers. Add a fallback to read from `metadata` when `litellm_metadata` is not a dict, so `x-litellm-enable-message-redaction` and related headers work correctly in the proxy flow. Fixes #20739 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: normalize non-dict metadata after fallback in redact_messages After falling back from litellm_metadata to metadata, ensure the value is always a dict so .get("headers") never raises on None/non-dict inputs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.