mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
Replace the request.path_params read (and its defensive getattr guard) with
the route template. A real Starlette request always exposes path_params, but
common_checks runs on lightweight request doubles that don't, so reading it
directly forced a getattr workaround that only existed to tolerate those
doubles.
Instead, match the route template (/team/{team_id}) to identify the RESTful
update route and take the team id from the last path segment. This drops the
path_params dependency entirely, and because the template distinguishes the
PATCH route from its single-segment siblings (/team/new, /team/list, ...), it
also avoids a spurious team lookup those routes would otherwise trigger if we
matched the resolved path shape alone.
|
||
|---|---|---|
| .. | ||
| resolvers | ||
| auth_checks.py | ||
| auth_checks_organization.py | ||
| auth_exception_handler.py | ||
| auth_method.py | ||
| auth_utils.py | ||
| budget_throttle.py | ||
| handle_jwt.py | ||
| ip_address_utils.py | ||
| litellm_license.py | ||
| login_utils.py | ||
| model_checks.py | ||
| network.py | ||
| oauth2_check.py | ||
| oauth2_proxy_hook.py | ||
| public_key.pem | ||
| rds_iam_token.py | ||
| roles.py | ||
| route_checks.py | ||
| trusted_proxy_utils.py | ||
| user_api_key_auth.py | ||