This commit is contained in:
Ishaan Jaffer
2026-01-14 18:12:01 -08:00
parent 27bc5c1fca
commit 62b4fe79b2
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -362,6 +362,8 @@ class LiteLLMRoutes(enum.Enum):
"/v1/ocr",
# containers API
"/containers",
"/v1/containers",
"/containers/*",
"/v1/containers/*",
]
+7 -1
View File
@@ -308,7 +308,7 @@ class RouteChecks:
return True
# fuzzy match routes like "/v1/threads/thread_49EIN5QF32s4mH20M7GFKdlZ"
# Check for routes with placeholders
# Check for routes with placeholders or wildcard patterns
for openai_route in LiteLLMRoutes.openai_routes.value:
# Replace placeholders with regex pattern
# placeholders are written as "/threads/{thread_id}"
@@ -317,6 +317,12 @@ class RouteChecks:
route=route, pattern=openai_route
):
return True
# Check for wildcard patterns like "/containers/*"
if RouteChecks._is_wildcard_pattern(pattern=openai_route):
if RouteChecks._route_matches_wildcard_pattern(
route=route, pattern=openai_route
):
return True
# Check for Google routes with placeholders like "/v1beta/models/{model_name}:generateContent"
for google_route in LiteLLMRoutes.google_routes.value: