mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
[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:
parent
06ded8750e
commit
62187103b4
2 changed files with 23 additions and 0 deletions
|
|
@ -360,6 +360,10 @@ class LiteLLMRoutes(enum.Enum):
|
|||
# OCR
|
||||
"/ocr",
|
||||
"/v1/ocr",
|
||||
|
||||
# containers API
|
||||
"/containers/*",
|
||||
"/v1/containers/*",
|
||||
]
|
||||
|
||||
mapped_pass_through_routes = [
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue