mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(auth): match placeholder native routes like /v1/traces/{trace_id}
This commit is contained in:
parent
3c3897d0ae
commit
15e2f87c02
1 changed files with 5 additions and 0 deletions
|
|
@ -413,6 +413,11 @@ class RouteChecks:
|
|||
if route in LiteLLMRoutes.litellm_native_routes.value:
|
||||
return True
|
||||
|
||||
# native routes with placeholders, e.g. "/v1/traces/{trace_id}"
|
||||
for native_route in LiteLLMRoutes.litellm_native_routes.value:
|
||||
if "{" in native_route and RouteChecks._route_matches_pattern(route=route, pattern=native_route):
|
||||
return True
|
||||
|
||||
# fuzzy match routes like "/v1/threads/thread_49EIN5QF32s4mH20M7GFKdlZ"
|
||||
# Check for routes with placeholders or wildcard patterns
|
||||
for openai_route in LiteLLMRoutes.openai_routes.value:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue