mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
* chore(proxy): cherry-pick #28547 onto patch/v1.84.1 Backport of #28547 (`d480ffda3c`) onto the `patch/v1.84.1` branch. Routes the remaining path-dependent call sites in auth, ACL, routing, and audit-log decisions through `get_request_route(request)` so they read from the ASGI `scope["path"]` instead of `request.url.path`. The helper itself already exists on v1.84.1 (added by #27904 / #27878); this PR extends the helper's usage to the additional sites listed below. Sites routed through get_request_route: - _experimental/mcp_server/auth/user_api_key_auth_mcp.py - management_endpoints/mcp_management_endpoints.py - vector_store_endpoints/utils.py - pass_through_endpoints/pass_through_endpoints.py - auth/route_checks.py - litellm_pre_call_utils.py - spend_tracking/spend_management_endpoints.py - common_utils/http_parsing_utils.py - management_helpers/utils.py - health_endpoints/_health_endpoints.py Regression tests in tests/proxy_unit_tests/test_proxy_routes.py construct a Request with scope["path"] set to a benign route and the Host header crafted so url.path would resolve differently; each site's decision is asserted against scope["path"]. Conflict resolution ------------------- Two files conflicted because v1.84.1's base predates the delegate_auth_to_upstream feature (#27834 — not on v1.84.1): 1. _experimental/mcp_server/auth/user_api_key_auth_mcp.py The cherry-pick brought in a `_target_servers_delegate_auth_to_upstream` elif branch in `process_mcp_request`. That branch is feature drift from #27834 and is irrelevant to the path-resolution change. Dropped the elif block; kept the get_request_route swap on the existing well-known/_target_servers_use_oauth2 call sites. 2. management_endpoints/mcp_management_endpoints.py The cherry-pick brought in the entire `_mcp_oauth_user_api_key_auth` function. That function does not exist on v1.84.1 (added by #27834); the #28547 change inside it is just a `request.url.path` → `get_request_route` swap. Dropped the function entirely. The other 8 production files and the test file auto-merged cleanly and contain only `request.url.path` → `get_request_route(request)` swaps plus the lazy auth_utils import (no feature drift). * bump: version 1.84.1 → 1.84.2 * chore: uv lock after version bump 1.84.1 → 1.84.2 |
||
|---|---|---|
| .. | ||
| a2a_protocol | ||
| anthropic_interface | ||
| assistants | ||
| batch_completion | ||
| batches | ||
| caching | ||
| completion_extras | ||
| compression | ||
| containers | ||
| endpoints/speech/speech_to_completion_bridge | ||
| evals | ||
| experimental_mcp_client | ||
| files | ||
| fine_tuning | ||
| google_genai | ||
| images | ||
| integrations | ||
| interactions | ||
| litellm_core_utils | ||
| llms | ||
| ocr | ||
| passthrough | ||
| proxy | ||
| proxy_auth | ||
| rag | ||
| realtime_api | ||
| rerank_api | ||
| responses | ||
| router_strategy | ||
| router_utils | ||
| search | ||
| secret_managers | ||
| skills | ||
| types | ||
| vector_store_files | ||
| vector_stores | ||
| videos | ||
| __init__.py | ||
| _internal_context.py | ||
| _lazy_imports.py | ||
| _lazy_imports_registry.py | ||
| _logging.py | ||
| _redis.py | ||
| _redis_credential_provider.py | ||
| _service_logger.py | ||
| _uuid.py | ||
| _version.py | ||
| anthropic_beta_headers_config.json | ||
| anthropic_beta_headers_manager.py | ||
| blog_posts.json | ||
| budget_manager.py | ||
| constants.py | ||
| cost.json | ||
| cost_calculator.py | ||
| exceptions.py | ||
| main.py | ||
| model_prices_and_context_window_backup.json | ||
| mypy.ini | ||
| policy_templates_backup.json | ||
| provider_endpoints_support_backup.json | ||
| py.typed | ||
| router.py | ||
| scheduler.py | ||
| setup_wizard.py | ||
| timeout.py | ||
| utils.py | ||