test_aaapass_through_endpoint_pass_through_keys_langfuse

This commit is contained in:
Ishaan Jaffer 2025-12-20 14:36:59 +05:30
parent 627d615322
commit c13b4c5514

View file

@ -443,10 +443,14 @@ async def test_aaapass_through_endpoint_pass_through_keys_langfuse(
}
# Make a request to the pass-through endpoint
# For langfuse custom_auth_parser, the Authorization header must be valid base64
# Format: base64(public_key:secret_key) where public_key is the LiteLLM API key
import base64
auth_token = base64.b64encode(f"{mock_api_key}:anything".encode()).decode()
response = client.post(
"/api/public/ingestion",
json=_json_data,
headers={"Authorization": "Basic test-base64-auth-token-123"},
headers={"Authorization": f"Basic {auth_token}"},
)
print("JSON response: ", _json_data)