[Fix] Containers API - Container API routes return 401 for non-admin users - routes missing from openai_routes (#19115)

* test_containers_routes_are_llm_api_routes

* allow /containers/* API
This commit is contained in:
Ishaan Jaff 2026-01-14 15:14:03 -08:00 • committed by GitHub
parent 06ded8750e
commit 62187103b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 0 deletions

View file

@ -360,6 +360,10 @@ class LiteLLMRoutes(enum.Enum):
# OCR
"/ocr",
"/v1/ocr",
# containers API
"/containers/*",
"/v1/containers/*",
]
mapped_pass_through_routes = [

View file

@ -732,6 +732,25 @@ def test_videos_route_is_llm_api_route(route):
assert RouteChecks.is_llm_api_route(route) is True
@pytest.mark.parametrize(
"route",
[
"/containers",
"/v1/containers",
"/containers/container_123",
"/v1/containers/container_123",
"/containers/container_123/files",
"/v1/containers/container_123/files",
"/containers/container_123/files/file_456",
"/v1/containers/container_123/files/file_456",
],
)
def test_containers_routes_are_llm_api_routes(route):
"""Test that container routes are recognized as LLM API routes"""
assert RouteChecks.is_llm_api_route(route) is True
def test_videos_route_accessible_to_internal_users():
"""
Test that internal users can access the videos routes.