Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
paths:
- local_testing_coverage.xml
- local_testing_coverage
ui_endpoint_testing:
auth_ui_unit_tests:
docker:
- image: cimg/python:3.11
auth:
Expand Down Expand Up @@ -161,8 +161,8 @@ jobs:
- run:
name: Rename the coverage files
command: |
mv coverage.xml ui_endpoint_testing_coverage.xml
mv .coverage ui_endpoint_testing_coverage
mv coverage.xml auth_ui_unit_tests_coverage.xml
mv .coverage auth_ui_unit_tests_coverage

# Store test results
- store_test_results:
Expand All @@ -171,8 +171,8 @@ jobs:
- persist_to_workspace:
root: .
paths:
- ui_endpoint_testing_coverage.xml
- ui_endpoint_testing_coverage
- auth_ui_unit_tests_coverage.xml
- auth_ui_unit_tests_coverage
litellm_router_testing: # Runs all tests with the "router" keyword
docker:
- image: cimg/python:3.11
Expand Down Expand Up @@ -813,7 +813,7 @@ jobs:
python -m venv venv
. venv/bin/activate
pip install coverage
coverage combine llm_translation_coverage logging_coverage litellm_router_coverage local_testing_coverage litellm_assistants_api_coverage ui_endpoint_testing_coverage
coverage combine llm_translation_coverage logging_coverage litellm_router_coverage local_testing_coverage litellm_assistants_api_coverage auth_ui_unit_tests_coverage
coverage xml
- codecov/upload:
file: ./coverage.xml
Expand Down Expand Up @@ -1013,7 +1013,7 @@ workflows:
only:
- main
- /litellm_.*/
- ui_endpoint_testing:
- auth_ui_unit_tests:
filters:
branches:
only:
Expand Down Expand Up @@ -1062,7 +1062,7 @@ workflows:
- litellm_router_testing
- local_testing
- litellm_assistants_api_testing
- ui_endpoint_testing
- auth_ui_unit_tests
- db_migration_disable_update_check:
filters:
branches:
Expand Down Expand Up @@ -1090,7 +1090,7 @@ workflows:
- logging_testing
- litellm_router_testing
- litellm_assistants_api_testing
- ui_endpoint_testing
- auth_ui_unit_tests
- db_migration_disable_update_check
- e2e_ui_testing
- installing_litellm_on_python
Expand Down
1 change: 1 addition & 0 deletions litellm/litellm_core_utils/litellm_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2515,6 +2515,7 @@ def get_standard_logging_metadata(
user_api_key_hash=None,
user_api_key_alias=None,
user_api_key_team_id=None,
user_api_key_org_id=None,
user_api_key_user_id=None,
user_api_key_team_alias=None,
spend_logs_metadata=None,
Expand Down
1 change: 1 addition & 0 deletions litellm/proxy/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ class LiteLLMRoutes(enum.Enum):
"/sso/get/ui_settings",
"/login",
"/key/generate",
"/key/{token_id}/regenerate",
"/key/update",
"/key/info",
"/key/delete",
Expand Down
8 changes: 4 additions & 4 deletions litellm/proxy/auth/auth_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
LitellmUserRoles,
UserAPIKeyAuth,
)
from litellm.proxy.auth.route_checks import is_llm_api_route
from litellm.proxy.auth.route_checks import RouteChecks
from litellm.proxy.utils import PrismaClient, ProxyLogging, log_to_opentelemetry
from litellm.types.services import ServiceLoggerPayload, ServiceTypes

Expand Down Expand Up @@ -138,7 +138,7 @@ def common_checks( # noqa: PLR0915
general_settings.get("enforce_user_param", None) is not None
and general_settings["enforce_user_param"] is True
):
if is_llm_api_route(route=route) and "user" not in request_body:
if RouteChecks.is_llm_api_route(route=route) and "user" not in request_body:
raise Exception(
f"'user' param not passed in. 'enforce_user_param'={general_settings['enforce_user_param']}"
)
Expand All @@ -154,7 +154,7 @@ def common_checks( # noqa: PLR0915
+ CommonProxyErrors.not_premium_user.value
)

if is_llm_api_route(route=route):
if RouteChecks.is_llm_api_route(route=route):
# loop through each enforced param
# example enforced_params ['user', 'metadata', 'metadata.generation_name']
for enforced_param in general_settings["enforced_params"]:
Expand Down Expand Up @@ -182,7 +182,7 @@ def common_checks( # noqa: PLR0915
and global_proxy_spend is not None
# only run global budget checks for OpenAI routes
# Reason - the Admin UI should continue working if the proxy crosses it's global budget
and is_llm_api_route(route=route)
and RouteChecks.is_llm_api_route(route=route)
and route != "/v1/models"
and route != "/models"
):
Expand Down
Loading