Litellm dev 01 02 2025 p1 (#7516)

* fix(redact_messages.py): fix redact messages for non-model response input to be dictionary

fixes issue with otel logging when message redaction is enabled

* fix(proxy_server.py): fix langfuse key leak in exception string

* test: fix test

* test: fix test

* test: fix tests
This commit is contained in:
Krish Dholakia 2025-01-03 14:40:57 -08:00 committed by GitHub
parent 766dbaa871
commit 43fc21413f
5 changed files with 16 additions and 22 deletions

View file

@ -1264,7 +1264,7 @@ def test_standard_logging_payload(model, turn_off_message_logging):
if turn_off_message_logging:
print("checks redacted-by-litellm")
assert "redacted-by-litellm" == slobject["messages"][0]["content"]
assert "redacted-by-litellm" == slobject["response"]
assert {"text": "redacted-by-litellm"} == slobject["response"]
@pytest.mark.parametrize(
@ -1358,7 +1358,7 @@ def test_standard_logging_payload_audio(turn_off_message_logging, stream):
if turn_off_message_logging:
print("checks redacted-by-litellm")
assert "redacted-by-litellm" == slobject["messages"][0]["content"]
assert "redacted-by-litellm" == slobject["response"]
assert {"text": "redacted-by-litellm"} == slobject["response"]
@pytest.mark.skip(reason="Works locally. Flaky on ci/cd")
@ -1467,7 +1467,9 @@ def test_logging_async_cache_hit_sync_call(turn_off_message_logging):
"redacted-by-litellm"
== standard_logging_object["messages"][0]["content"]
)
assert "redacted-by-litellm" == standard_logging_object["response"]
assert {"text": "redacted-by-litellm"} == standard_logging_object[
"response"
]
def test_logging_standard_payload_failure_call():