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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
remove unsupported select param from find_many call
yuneng-jiang06e87eea877f
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.pyindex 8ac6f282719..8a5145bf793 100644--- a/litellm/proxy/management_endpoints/key_management_endpoints.py+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py@@ -4152,7 +4152,6 @@ async def key_aliases()rows = await prisma_client.db.litellm_verificationtoken.find_many(where=where,- select={"key_alias": True},order=[{"key_alias": "asc"}],skip=(page - 1) * size,take=size,diff --git a/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.pyindex 8580c89fdaa..bdfc6734664 100644--- a/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py+++ b/tests/test_litellm/proxy/management_endpoints/test_key_management_endpoints.py@@ -6297,15 +6297,3 @@ async def test_key_aliases_no_search_omits_contains_filter():assert "contains" not in json.dumps(where)-async def test_key_aliases_select_only_key_alias():- """Test that find_many is called with select={key_alias: True} to avoid fetching full rows."""- mock_prisma_client = AsyncMock()- mock_prisma_client.db.litellm_verificationtoken.count = AsyncMock(return_value=0)- mock_prisma_client.db.litellm_verificationtoken.find_many = AsyncMock(return_value=[])-- with patch("litellm.proxy.proxy_server.prisma_client", mock_prisma_client):- await key_aliases(page=1, size=50, search=None)-- find_many_kwargs = mock_prisma_client.db.litellm_verificationtoken.find_many.call_args.kwargs- assert find_many_kwargs.get("select") == {"key_alias": True}