mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-17 20:48:32 +00:00
test: set allow_client_tags on duplicate-tag merge test
test_add_litellm_data_to_request_duplicate_tags tests the request/key tag merge when tags overlap. The merge requires caller-supplied tags to flow through — set allow_client_tags=True on the key so the merge path stays testable under the new default-deny regime.
This commit is contained in:
@@ -842,12 +842,13 @@ async def test_add_litellm_data_to_request_duplicate_tags(
|
||||
mock_request.headers = {}
|
||||
mock_request.state = State()
|
||||
|
||||
# Setup key with tags in metadata
|
||||
# Setup key with tags in metadata. Opt into client-supplied tags so the
|
||||
# request_tags are preserved for the merge under test.
|
||||
user_api_key_dict = UserAPIKeyAuth(
|
||||
api_key="test_api_key",
|
||||
user_id="test_user_id",
|
||||
org_id="test_org_id",
|
||||
metadata={"tags": key_tags},
|
||||
metadata={"tags": key_tags, "allow_client_tags": True},
|
||||
)
|
||||
|
||||
# Setup request data with tags
|
||||
|
||||
Reference in New Issue
Block a user