Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Fix aim security guardrail tests (#17499)

Yannay Hammer2627f0d51982
diff --git a/tests/local_testing/test_aim_guardrails.py b/tests/local_testing/test_aim_guardrails.py
index f24b74e5110..baf46d96417 100644
--- a/tests/local_testing/test_aim_guardrails.py
+++ b/tests/local_testing/test_aim_guardrails.py
@@ -185,7 +185,7 @@ async def test_anonymize_callback__it_returns_redacted_content(mode: str):
@pytest.mark.asyncio
-async def test_post_call__with_anonymized_entities__it_deanonymizes_output():
+async def test_post_call__with_anonymized_entities__it_doesnt_deanonymize_output():
init_guardrails_v2(
all_guardrails=[
{
@@ -261,7 +261,7 @@ async def test_post_call__with_anonymized_entities__it_deanonymizes_output():
response=llm_response(),
user_api_key_dict=UserAPIKeyAuth(key_alias="test-key"),
)
- assert result["choices"][0]["message"]["content"] == "Hello Brian! How are you?"
+ assert result["choices"][0]["message"]["content"] == "Hello [NAME_1]! How are you?"
@pytest.mark.asyncio