litellm/tests/unit/proxy/management_endpoints
Mateo Wang 0ceca31081
feat(proxy): per-provider and per-model rpm/tpm requirements for enforce_project_model_quota (#47693)
* feat(proxy): per-provider and per-model rpm/tpm requirements for enforce_project_model_quota

* test(proxy): cover per-provider and per-model enforce_project_model_quota policies

* fix(proxy): keep enforce_project_model_quota reads typed

* fix(proxy): apply the quota policy to model add, follow router wildcard rules, keep old setting values

* fix(proxy): keep team model names off quota model entries, read the provider behind api_base, match patterns like the router

A team admin picks a team model's public name, so a name matching an exempt model entry no longer skips its provider's limits. A mapping with no policy key keeps requiring both limits as before, the project create permission check runs before the setting is read, and an unprefixed model behind a known OpenAI-compatible api_base resolves to that provider

* fix(proxy): re-check team projects on team model writes and validate quota provider ids

* fix(proxy): check added limits on model updates and match team models by the model they call

* fix(proxy): re-check team projects by every name a team model serves and check renamed names

* fix(proxy): follow the router's order for tied team patterns and annotate quota tests

* fix(proxy): match a team model's called model through JSON provider prefixes too

* fix(proxy): keep model updates that keep their route as on main

A PATCH or POST model update now checks only the limits its new route adds over the stored one, so removing or zeroing a limit on an unchanged route answers 200 again, under true and under a policy
2026-10-28 05:24:41 -07:00
..
management_v1 feat(ui): sort budgets by reset duration (#48107) 2026-10-23 16:21:53 -07:00
policy_endpoints feat(proxy): add LITELLM_OFFLINE_MODE, one switch for the fetches LiteLLM makes on its own (#48096) 2026-10-23 16:54:19 -07:00
scim fix(scim)!: delete a group through the team delete's bulk path instead of one member at a time (#47544) 2026-10-21 00:59:23 +00:00
search_endpoints
sso
usage_endpoints feat(ui): unify gateway and usage assistance as Aria Agent (#48082) 2026-10-23 20:24:19 +00:00
__init__.py
jwt_key_mapping_doubles.py
test_access_group_endpoints.py
test_access_group_management.py
test_activity_tenant_scoping.py
test_auto_router_endpoints.py
test_budget_endpoints.py
test_cache_settings_endpoints.py
test_callback_management_endpoints.py
test_common_daily_activity.py
test_common_utils.py
test_compliance_endpoints.py
test_config_override_endpoints.py
test_coordination_redis_endpoints.py
test_cost_estimate_endpoint.py
test_cost_tracking_settings.py
test_credential_migration.py
test_customer_budget.py
test_customer_endpoints.py fix(proxy)!: paginate customer lists and usage filters (#48700) 2026-10-27 19:46:06 -07:00
test_daily_activity_routes.py
test_delete_callbacks_endpoint.py
test_delete_verification_tokens_failed.py
test_encryption_endpoints.py
test_entraid_app_roles.py
test_gateway_request_endpoints.py
test_id_jag_assertion_capture.py
test_internal_user_endpoints.py fix(scim)!: delete a group through the team delete's bulk path instead of one member at a time (#47544) 2026-10-21 00:59:23 +00:00
test_jwt_key_mapping.py
test_key_budget_change.py fix(proxy)!: gate key budget_duration and budget_id updates like max_budget (#47681) 2026-10-26 16:45:35 -07:00
test_key_generate_prisma.py
test_key_management_endpoints.py fix(proxy): return 403 naming the Enterprise licence for get_spend_routes without a licence (#48623) 2026-10-27 12:32:48 -07:00
test_management_route_coverage.py
test_mcp_connector_import.py
test_mcp_management_endpoints.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_mcp_servers.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_model_insights_endpoints.py
test_model_management_endpoints.py feat(proxy): per-provider and per-model rpm/tpm requirements for enforce_project_model_quota (#47693) 2026-10-28 05:24:41 -07:00
test_org_admin_team_access.py
test_organization_endpoints.py feat(ui): budget period tooltip on key, team, user and org spend tiles (#48487) 2026-10-26 17:05:37 -07:00
test_password_endpoints.py
test_policy_endpoints.py
test_project_org_authz.py
test_prompt_cache_prediction.py
test_prompt_caching_requests.py
test_ptu_consumption.py fix(router): serve a team's wildcard deployment before a proxy-wide wildcard (#48490) 2026-10-26 17:06:09 -07:00
test_ptu_model_settings.py fix(ui): persist model parameter deletions after refresh (#48456) 2026-10-26 18:50:12 -07:00
test_request_error_endpoints.py
test_roi_calculator_endpoints.py
test_router_settings_endpoints.py
test_saml_sso.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_session_endpoints.py
test_sso_helper_utils.py
test_tag_management_endpoints.py feat(proxy): map baggage values to budget tags (#47358) 2026-10-20 09:09:42 +00:00
test_team_admin_field_permissions.py
test_team_callback_endpoints.py
test_team_default_params.py
test_team_endpoints.py fix(proxy): reconcile team member total_spend with current cycle spend (#48260) 2026-10-24 17:57:09 -07:00
test_team_model_alias_merge.py
test_tool_management_endpoints.py
test_ui_sso.py refactor(mcp): drop the experimental label from the MCP server and client paths (#48513) 2026-10-27 17:47:50 +00:00
test_workflow_management_endpoints.py