Commit graph

6 commits

Author SHA1 Message Date
yuneng-jiang
5255235eb3 chore(proxy): backport host-derived-path call site fix from #28547
Surgical port to v1.83.10 patch series of upstream PR #28547 (merge
commit c854fc86). Replaces request.url.path with get_request_route() at
call sites whose path-based decisions must not be smuggled via the Host
header, since Starlette reconstructs url.path from the Host header but
FastAPI dispatches on scope["path"].

Mechanical substitutions applied (9 files, auto-merged):
- litellm/proxy/auth/auth_utils.py (docstring update only)
- litellm/proxy/auth/route_checks.py
- litellm/proxy/common_utils/http_parsing_utils.py
- litellm/proxy/health_endpoints/_health_endpoints.py
- litellm/proxy/litellm_pre_call_utils.py
- litellm/proxy/management_helpers/utils.py
- litellm/proxy/pass_through_endpoints/pass_through_endpoints.py
- litellm/proxy/spend_tracking/spend_management_endpoints.py
- litellm/proxy/vector_store_endpoints/utils.py

Conflicted files (manual surgical resolution):
- litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py:
  Replaced '.well-known' in str(request.url) (host-header vulnerable
  substring check) with get_request_route(request).startswith(
  '/.well-known/'). Dropped the upstream PR's other substitutions
  (_target_servers_delegate_auth_to_upstream, _target_servers_use_oauth2,
  ProxyException-union handler) because the call sites do not exist in
  this branch.
- litellm/proxy/management_endpoints/mcp_management_endpoints.py:
  No mechanical substitution applies. The upstream PR's only call site
  for this file (_mcp_oauth_user_api_key_auth, an OAuth dependency for
  /authorize and /token PKCE endpoints) does not exist in this branch.
  Kept HEAD's sync _get_cached_temporary_mcp_server_or_404 unchanged.
- tests/proxy_unit_tests/test_proxy_routes.py:
  Added the upstream PR's regression tests. The pkce_token_suffix case
  exercises helper-level behavior only (no production call site for it
  in this branch); kept for symmetry and helper coverage.
2026-05-26 14:23:08 -07:00
Ishaan Jaffer
e8461b5b97
style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
Shivam Rawat
9ceaa2cbb0
tests and route permissions (#21508) 2026-02-18 16:58:38 -08:00
Yuta Saito
3a55f68ea4 test: handle wildcard routes in route validation test 2026-01-16 12:53:27 +09:00
Ishaan Jaff
02f5c44a35
[Bug fix]: Proxy Auth Layer - Allow Azure Realtime routes as llm_api_routes (#7684)
* fix route check azure realtime endpoints

* test_is_llm_api_route

* fix /realtime

* test_routes_on_litellm_proxy
2025-01-10 20:38:06 -08:00
Krish Dholakia
27e18358ab
fix(pattern_match_deployments.py): default to user input if unable to… (#6632)
* fix(pattern_match_deployments.py): default to user input if unable to map based on wildcards

* test: fix test

* test: reset test name

* test: update conftest to reload proxy server module between tests

* ci(config.yml): move langfuse out of local_testing

reduce ci/cd time

* ci(config.yml): cleanup langfuse ci/cd tests

* fix: update test to not use global proxy_server app module

* ci: move caching to a separate test pipeline

speed up ci pipeline

* test: update conftest to check if proxy_server attr exists before reloading

* build(conftest.py): don't block on inability to reload proxy_server

* ci(config.yml): update caching unit test filter to work on 'cache' keyword as well

* fix(encrypt_decrypt_utils.py): use function to get salt key

* test: mark flaky test

* test: handle anthropic overloaded errors

* refactor: create separate ci/cd pipeline for proxy unit tests

make ci/cd faster

* ci(config.yml): add litellm_proxy_unit_testing to build_and_test jobs

* ci(config.yml): generate prisma binaries for proxy unit tests

* test: readd vertex_key.json

* ci(config.yml): remove `-s` from proxy_unit_test cmd

speed up test

* ci: remove any 'debug' logging flag

speed up ci pipeline

* test: fix test

* test(test_braintrust.py): rerun

* test: add delay for braintrust test
2024-11-08 00:55:57 +05:30
Renamed from tests/local_testing/test_proxy_routes.py (Browse further)