litellm/litellm
yuneng-jiang 5560f35279
chore(proxy): cherry-pick #28547 onto patch/v1.84.1 (#28967)
* 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
2026-05-27 00:30:43 -07:00
..
a2a_protocol feat(guardrails): LLM-as-a-Judge guardrail (#26360) 2026-04-24 17:15:32 -07:00
anthropic_interface style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
assistants
batch_completion
batches [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
caching [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
completion_extras Revert "Merge pull request #24417 from Chesars/refactor/shared-format-mapping" 2026-04-25 15:03:24 -03:00
compression Prompt Compression - add it to the proxy (#25729) 2026-04-20 15:08:00 -07:00
containers style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
endpoints/speech/speech_to_completion_bridge
evals style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
experimental_mcp_client refactor(mcp): reuse existing sessions for initialize instructions 2026-04-14 14:46:06 +03:00
files [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
fine_tuning address greptile review feedback (greploop iteration 1) 2026-03-27 20:04:41 +05:30
google_genai feat(proxy): LiteLLM headers on Google native generateContent routes (#25500) 2026-04-29 12:34:14 -07:00
images Feat(dashscope): add image generation support for qwen-image-2.0 and qwen-image-2.0-pro (#25672) 2026-04-22 20:03:46 -07:00
integrations [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
interactions style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
litellm_core_utils fix(vertex_ai): omit function_call id on Vertex Gemini 3.5+ tool turns (#28324) 2026-05-20 18:49:17 -07:00
llms fix(vertex_ai): omit function_call id on Vertex Gemini 3.5+ tool turns (#28324) 2026-05-20 18:49:17 -07:00
ocr chore: reject bare str at file-input sinks to prevent local-file read (#27762) 2026-05-12 17:30:03 -07:00
passthrough fix(passthrough): log when streaming spend-tracking flush fails to schedule 2026-04-30 02:39:29 +00:00
proxy chore(proxy): cherry-pick #28547 onto patch/v1.84.1 (#28967) 2026-05-27 00:30:43 -07:00
proxy_auth
rag style: black formatting 2026-04-25 14:47:54 -07:00
realtime_api Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
rerank_api Fix review 2026-04-30 09:10:24 +05:30
responses [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
router_strategy [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
router_utils [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
search style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
secret_managers [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
skills [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
types fix(vertex_ai): omit function_call id on Vertex Gemini 3.5+ tool turns (#28324) 2026-05-20 18:49:17 -07:00
vector_store_files Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
vector_stores [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
videos style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
__init__.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
_internal_context.py fix(proxy): harden request parameter handling 2026-04-16 01:38:12 +00:00
_lazy_imports.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
_lazy_imports_registry.py feat(bedrock): add support for bedrock-mantle endpoint (Claude Mythos Preview) (#26196) 2026-04-21 15:41:58 -07:00
_logging.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
_redis.py Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
_redis_credential_provider.py fix(redis): cache GCP IAM token to prevent async event loop blocking (#26441) 2026-04-25 23:13:39 -07:00
_service_logger.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_uuid.py
_version.py
anthropic_beta_headers_config.json [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
anthropic_beta_headers_manager.py Refactor: Filtering beta header after transformation 2026-03-16 10:47:15 +05:30
blog_posts.json docs(blog): add WebRTC blog post link 2026-03-13 17:54:33 +05:30
budget_manager.py
constants.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
cost.json
cost_calculator.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
exceptions.py fix(proxy): invoke post-call guardrails on pass-through endpoint responses (#20270) (#26262) 2026-04-27 08:58:22 +05:30
main.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
model_prices_and_context_window_backup.json Day 0 support : Gemini 3.5 Flash (#28268) 2026-05-20 18:42:35 -07:00
mypy.ini
policy_templates_backup.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
provider_endpoints_support_backup.json Feature/add audio support for scaleway (#26110) 2026-04-20 14:49:41 -07:00
py.typed
router.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
scheduler.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
setup_wizard.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
timeout.py
utils.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00