From 432d99f3ee31bd6a19fa014d75cd9bfdda0283a8 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Thu, 25 Jun 2026 23:48:21 -0700 Subject: [PATCH] test(pass-through): grant allowed_passthrough_routes so langfuse auth=true test reaches rpm path #29256 made auth=true pass-through routes deny-by-default unless the key/team has allowed_passthrough_routes configured, but this integration test was not updated. The test key had no allowlist, so the auth=true parametrizations (rpm_limit=0 -> expect 429, rpm_limit=2 -> expect 207) now hit the 403 gate in auth before reaching the rpm/forwarding logic they mean to exercise. Grant the test key allowed_passthrough_routes for /api/public/ingestion so it clears the gate. Also removes a latent order-dependency: the case only passed locally when an earlier (auth=false) parametrization registered the route first; under worker isolation (CI xdist) it failed with 403. --- tests/local_testing/test_pass_through_endpoints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/local_testing/test_pass_through_endpoints.py b/tests/local_testing/test_pass_through_endpoints.py index 68ba62bcbab..eeb29dea531 100644 --- a/tests/local_testing/test_pass_through_endpoints.py +++ b/tests/local_testing/test_pass_through_endpoints.py @@ -402,7 +402,9 @@ async def test_aaapass_through_endpoint_pass_through_keys_langfuse( mock_api_key = "sk-my-test-key" cache_value = UserAPIKeyAuth( - token=hash_token(mock_api_key), rpm_limit=rpm_limit + token=hash_token(mock_api_key), + rpm_limit=rpm_limit, + metadata={"allowed_passthrough_routes": ["/api/public/ingestion"]}, ) _cohere_api_key = os.environ.get("COHERE_API_KEY")