diff --git a/litellm/litellm_core_utils/redact_messages.py b/litellm/litellm_core_utils/redact_messages.py index ad68f3851a8..ddeb24d04a6 100644 --- a/litellm/litellm_core_utils/redact_messages.py +++ b/litellm/litellm_core_utils/redact_messages.py @@ -123,6 +123,16 @@ def perform_redaction(model_call_details: dict, result): elif isinstance(_result, litellm.EmbeddingResponse): if hasattr(_result, "data") and _result.data is not None: _result.data = [] + elif isinstance(_result, dict) and "choices" in _result: + # ModelResponse.model_dump() returns dict - redact choices in place + if isinstance(_result.get("choices"), list) and len(_result["choices"]) > 0: + choice = _result["choices"][0] + if isinstance(choice, dict) and "message" in choice: + msg = choice["message"] + if isinstance(msg, dict) and "content" in msg: + msg["content"] = "redacted-by-litellm" + if isinstance(msg, dict) and "audio" in msg: + msg["audio"] = None else: return {"text": "redacted-by-litellm"} return _result diff --git a/provider_endpoints_support.json b/provider_endpoints_support.json index b1d4d5a1164..0b3f87fbe09 100644 --- a/provider_endpoints_support.json +++ b/provider_endpoints_support.json @@ -458,6 +458,24 @@ "interactions": true } }, + "charity_engine": { + "display_name": "Charity Engine (`charity_engine`)", + "url": "https://docs.litellm.ai/docs/providers/charity_engine", + "endpoints": { + "chat_completions": true, + "messages": true, + "responses": true, + "embeddings": false, + "image_generations": false, + "audio_transcriptions": false, + "audio_speech": false, + "moderations": false, + "batches": false, + "rerank": false, + "a2a": false, + "interactions": false + } + }, "chutes": { "display_name": "Chutes (`chutes`)", "endpoints": {