mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Three issues surfaced in review of the previous commit: 1. **Veria — Medium**: ``litellm_params`` carries a nested ``litellm_embedding_config`` dict (auto-resolved from the model registry on create / update) which itself holds ``api_key`` / ``aws_*`` / ``vertex_credentials``. The previous redactor only inspected top-level keys, so the nested values passed through unredacted. Recurse into nested dicts. 2. **Greptile — P2**: when ``litellm_params`` is a JSON-serialized string (the in-memory registry occasionally stores it that way), the previous redactor silently no-op'd via the ``isinstance(..., dict)`` guard and echoed the raw payload back. Now: parse, redact, re-serialize. If the string is not valid JSON, replace it with the redaction sentinel rather than echo it. 3. **mypy** flagged ``_redact_sensitive_litellm_params``'s ``Optional[Dict[str, Any]]`` signature as incompatible with the ``object``-typed call site. Widened to ``Any -> Any`` to reflect the actual contract (the function now handles dict / str / None / other). Also fixes a related test regression in ``test_remove_sensitive_info_from_deployment_with_excluded_keys``: the ``"credentials"`` plural addition to ``SensitiveDataMasker`` defaults caused the first call (without ``excluded_keys``) to mutate the input dict's ``litellm_credentials_name`` to a masked value. The second call (with ``excluded_keys``) then saw the already-masked value rather than the original. Construct fresh input for each call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| test_callback_utils.py | ||
| test_custom_openapi_spec.py | ||
| test_expired_ui_session_key_cleanup_manager.py | ||
| test_get_routes.py | ||
| test_http_parsing_utils.py | ||
| test_key_rotation_e2e.py | ||
| test_key_rotation_integration.py | ||
| test_key_rotation_lock.py | ||
| test_key_rotation_manager.py | ||
| test_load_config_utils.py | ||
| test_openai_endpoint_utils.py | ||
| test_path_utils.py | ||
| test_reset_budget_job.py | ||
| test_timezone_utils.py | ||
| test_upsert_budget_membership.py | ||