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]

Update tests/test_litellm/test_router_silent_experiment.py

Harshit Jaindc6f68b43187
diff --git a/tests/test_litellm/test_router_silent_experiment.py b/tests/test_litellm/test_router_silent_experiment.py
index 24f574a4f8b..f5c5729cd44 100644
--- a/tests/test_litellm/test_router_silent_experiment.py
+++ b/tests/test_litellm/test_router_silent_experiment.py
@@ -81,6 +81,9 @@ def test_get_silent_experiment_kwargs():
assert "is_silent_experiment" not in kwargs["metadata"]
assert kwargs["metadata"]["litellm_parent_otel_span"] is mock_span
assert kwargs["metadata"]["user_api_key_auth"] is mock_auth
+ # Shallow copy must preserve user_api_key_auth so the silent experiment
+ # can attribute billing / spend logs to the correct key/team.
+ assert result["metadata"]["user_api_key_auth"] is mock_auth
def test_silent_experiment_completion_direct():