Skip to content

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]

fix(internal_user_endpoints.py): allow internal user to query their own info, without knowing their id

Krrish Dholakia1fbe27908487
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 36eaa2f6425..b201abd02a0 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -7566,6 +7566,18 @@
"litellm_provider": "bedrock",
"mode": "embedding"
},
+ "us.deepseek.r1-v1:0": {
+ "max_tokens": 4096,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 4096,
+ "input_cost_per_token": 0.00000135,
+ "output_cost_per_token": 0.0000054,
+ "litellm_provider": "bedrock_converse",
+ "mode": "chat",
+ "supports_function_calling": false,
+ "supports_tool_choice": false
+
+ },
"meta.llama3-3-70b-instruct-v1:0": {
"max_tokens": 4096,
"max_input_tokens": 128000,
diff --git a/litellm/proxy/management_endpoints/internal_user_endpoints.py b/litellm/proxy/management_endpoints/internal_user_endpoints.py
index 37b6f0bbf54..85b58ba5963 100644
--- a/litellm/proxy/management_endpoints/internal_user_endpoints.py
+++ b/litellm/proxy/management_endpoints/internal_user_endpoints.py
@@ -365,6 +365,8 @@ async def user_info(
and user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN
):
return await _get_user_info_for_proxy_admin()
+ elif user_id is None:
+ user_id = user_api_key_dict.user_id
## GET USER ROW ##
if user_id is not None:
user_info = await prisma_client.get_data(user_id=user_id)
@@ -373,10 +375,6 @@ async def user_info(
## GET ALL TEAMS ##
team_list = []
team_id_list = []
- # get all teams user belongs to
- # teams_1 = await prisma_client.get_data(
- # user_id=user_id, table_name="team", query_type="find_all"
- # )
from litellm.proxy.management_endpoints.team_endpoints import list_team
teams_1 = await list_team(