litellm/tests/test_litellm/proxy
rioiart 70126d9130
Fix/new org team validate against org (#17333)
* fix: skip user budget/model validation for org-scoped teams

When creating a team with organization_id, budget and model constraints
should be validated against the organization's limits, not the user's
personal limits. This allows org admins with restrictive personal
budgets to create teams within their organization's more generous limits.

Adds 4 unit tests to verify:
- Org-scoped teams bypass user budget validation
- Org-scoped teams bypass user model validation
- Standalone teams still validate against user limits

* fix: enforce user budget/model limits for standalone teams in update_team

- Add user-level budget and model validation to update_team endpoint for standalone teams,
  matching the existing pattern in new_team
- Org-scoped teams correctly bypass user validation and use organization limits instead
- Add 5 new comprehensive tests covering standalone/org team budget/model validation

* fix: Add direct TPM/RPM org limit validation and consolidate user team limit checks

- Add direct TPM/RPM comparison against org limits in _check_org_team_limits()
- Consolidate budget/models/TPM/RPM user validation into _check_user_team_limits() helper
- Ensure user limits only apply to standalone teams (organization_id=None)
- Org-scoped teams now validate TPM/RPM against org limits (not user limits)
- Add 8 tests for TPM/RPM validation scenarios (org and user limits)
- Reduce code duplication between new_team() and update_team()
2025-12-01 19:51:42 -08:00
..
_experimental/mcp_server feat: add backend support for OAuth2 auth_type registration via UI (#17006) 2025-11-23 21:52:18 -08:00
anthropic_endpoints test fixes 2025-06-25 18:42:06 -07:00
auth [Feat] JWT Auth - AI Gateway, allow using regular OIDC flow with user info endpoints (#17324) 2025-12-01 13:59:00 -08:00
client [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
common_utils Metadata: fix 401 when audio/transcriptions (#17023) 2025-11-24 20:56:27 -08:00
db Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-24 21:14:05 -08:00
experimental/mcp_server Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
google_endpoints test google endpoints 2025-10-31 20:50:31 -07:00
guardrails Fix session consistency, move Lasso API version away from source code (#17316) 2025-12-01 10:03:51 -08:00
health_endpoints Add Langfuse OTEL and SQS to health check (#16514) 2025-11-12 18:25:30 -08:00
hooks fix: prompt injection not working (#16701) 2025-11-17 20:04:57 -08:00
image_endpoints test fix 2025-10-17 10:46:42 -07:00
management_endpoints Fix/new org team validate against org (#17333) 2025-12-01 19:51:42 -08:00
management_helpers [MCP Gateway] Litellm mcp fixes team control (#15304) 2025-10-07 16:48:00 -07:00
middleware Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
openai_files_endpoint fix issue from pr review 2025-10-01 11:57:10 +08:00
pass_through_endpoints Add passthrough cost tracking for veo 2025-12-01 14:33:03 +05:30
prompts TestPromptVersionsEndpoint 2025-11-21 16:21:13 -08:00
public_endpoints Change provider create fields to JSON (#16985) 2025-11-23 21:57:22 -08:00
response_api_endpoints [Fix] - Responses API - add /openai routes for responses API. (Azure OpenAI SDK Compatibility) (#15988) 2025-10-27 19:12:13 -07:00
spend_tracking Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-20 20:19:16 -08:00
test_configs Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
ui_crud_endpoints [Infra] Litellm Backend SSO Changes (#16029) 2025-10-30 14:32:08 -07:00
vector_store_endpoints [Bug fix] Vector Store List Endpoint Returns 404 (#17229) 2025-11-27 12:51:51 -08:00
__init__.py test fix 2025-10-17 10:46:42 -07:00
test_batch_metadata_none_fix.py Fix issue #13995: Handle None metadata in batch requests (#13996) 2025-08-27 14:51:09 -07:00
test_caching_routes.py [Bug Fix] Ensure /redis/info works on GCP Redis (#11732) 2025-06-14 15:35:09 -07:00
test_common_request_processing.py Revert "fix: respect guardrail mock_response during during_call to return blo…" (#17332) 2025-12-01 15:40:28 -08:00
test_custom_proxy.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07:00
test_fastapi_offline_routes.py [Bug Fix] - Get Routes (#13466) 2025-08-09 12:52:23 -07:00
test_health_check_functions.py Implement health check backend API and storage functionality - fix ci/cd (#11852) 2025-06-18 06:57:08 -07:00
test_litellm_pre_call_utils.py Fix key model alias (#16896) 2025-11-20 16:05:49 -08:00
test_model_id_header_propagation.py (fix) propagate x-litellm-model-id in responses (#16986) 2025-11-24 20:40:43 -08:00
test_proxy_cli.py feature/add max requests env var 2025-09-28 19:18:56 +01:00
test_proxy_server.py [Feat] Prompt Management - Allow storing prompt version in DB (#16848) 2025-11-19 13:19:56 -08:00
test_proxy_types.py Litellm dev 06 06 2025 p1 (#11496) 2025-06-07 09:12:16 -07:00
test_proxy_utils.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07:00
test_route_llm_request.py Fix create, search vector store error (#13285) 2025-08-06 11:15:17 -07:00
test_shared_health_check.py Add shared healthcheck 2025-10-09 22:18:05 +05:30
test_spend_log_cleanup.py Fix/gemini api key environment variable support (#12507) 2025-07-29 15:56:01 -07:00
test_swagger_chat_completions.py [Bug Fix] Allow using Swagger for /chat/completions (#13469) 2025-08-09 15:35:45 -07:00
test_team_member_update.py fix mapped tests (#12320) 2025-07-04 10:04:43 -07:00