mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
feat(router.py): support request prioritization for text completion c… (#7540)
* feat(router.py): support request prioritization for text completion calls * fix(internal_user_endpoints.py): fix sql query to return all keys, including null team id keys on `/user/info` Fixes https://github.com/BerriAI/litellm/issues/7485 * fix: fix linting errors * fix: fix linting error * test(test_router_helper_utils.py): add direct test for '_schedule_factory' Fixes code qa test
This commit is contained in:
parent
fb1272b46b
commit
db82b3bb2a
7 changed files with 229 additions and 3 deletions
|
@ -404,7 +404,7 @@ async def _get_user_info_for_proxy_admin():
|
|||
sql_query = """
|
||||
SELECT
|
||||
(SELECT json_agg(t.*) FROM "LiteLLM_TeamTable" t) as teams,
|
||||
(SELECT json_agg(k.*) FROM "LiteLLM_VerificationToken" k WHERE k.team_id != 'litellm-dashboard') as keys
|
||||
(SELECT json_agg(k.*) FROM "LiteLLM_VerificationToken" k WHERE k.team_id != 'litellm-dashboard' OR k.team_id IS NULL) as keys
|
||||
"""
|
||||
if prisma_client is None:
|
||||
raise Exception(
|
||||
|
@ -413,6 +413,8 @@ async def _get_user_info_for_proxy_admin():
|
|||
|
||||
results = await prisma_client.db.query_raw(sql_query)
|
||||
|
||||
verbose_proxy_logger.debug("results_keys: %s", results)
|
||||
|
||||
_keys_in_db: List = results[0]["keys"] or []
|
||||
# cast all keys to LiteLLM_VerificationToken
|
||||
keys_in_db = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue