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
Fixed incorrect key info endpoint (#13633)
Daniel Barker47edecd5bc56
diff --git a/litellm/proxy/client/keys.py b/litellm/proxy/client/keys.pyindex 24c6c2721a1..8c62eb8e4d0 100644--- a/litellm/proxy/client/keys.py+++ b/litellm/proxy/client/keys.py@@ -236,7 +236,7 @@ class KeysManagementClient:UnauthorizedError: If the request fails with a 401 status coderequests.exceptions.RequestException: If the request fails with any other error"""- url = f"{self._base_url}/keys/info?key={key}"+ url = f"{self._base_url}/key/info?key={key}"request = requests.Request("GET", url, headers=self._get_headers())if return_request:diff --git a/tests/test_litellm/proxy/client/test_keys.py b/tests/test_litellm/proxy/client/test_keys.pyindex bc6114ab350..06cedf13104 100644--- a/tests/test_litellm/proxy/client/test_keys.py+++ b/tests/test_litellm/proxy/client/test_keys.py@@ -370,7 +370,7 @@ def test_info_request_minimal(client, base_url, api_key):"""Test info request with minimal parameters"""request = client.info(key="test-key", return_request=True)assert request.method == "GET"- assert request.url == f"{base_url}/keys/info?key=test-key"+ assert request.url == f"{base_url}/key/info?key=test-key"assert request.headers["Content-Type"] == "application/json"assert request.headers["Authorization"] == f"Bearer {api_key}"@@ -387,7 +387,7 @@ def test_info_mock_response(client):}responses.add(responses.GET,- f"{client._base_url}/keys/info?key=test-key",+ f"{client._base_url}/key/info?key=test-key",json=mock_response,status=200,)@@ -400,7 +400,7 @@ def test_info_unauthorized_error(client):"""Test that info raises UnauthorizedError for 401 responses"""responses.add(responses.GET,- f"{client._base_url}/keys/info?key=test-key",+ f"{client._base_url}/key/info?key=test-key",status=401,json={"error": "Unauthorized"},)@@ -413,7 +413,7 @@ def test_info_server_error(client):"""Test that info raises HTTPError for server errors"""responses.add(responses.GET,- f"{client._base_url}/keys/info?key=test-key",+ f"{client._base_url}/key/info?key=test-key",status=500,json={"error": "Internal Server Error"},)