mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-10 23:06:52 +00:00
allow pass through routes as LLM API routes
This commit is contained in:
@@ -78,6 +78,17 @@ def is_llm_api_route(route: str) -> bool:
|
||||
if re.match(pattern, route):
|
||||
return True
|
||||
|
||||
# Pass through Bedrock, VertexAI, and Cohere Routes
|
||||
if "/bedrock/" in route:
|
||||
return True
|
||||
if "/vertex-ai/" in route:
|
||||
return True
|
||||
if "/gemini/" in route:
|
||||
return True
|
||||
if "/cohere/" in route:
|
||||
return True
|
||||
if "/langfuse/" in route:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ def test_routes_on_litellm_proxy():
|
||||
("/v2/chat/completions", False),
|
||||
("/threads/invalid/format", False),
|
||||
("/v1/non_existent_endpoint", False),
|
||||
# Bedrock Pass Through Routes
|
||||
("/bedrock/model/cohere.command-r-v1:0/converse", True),
|
||||
("/vertex-ai/model/text-embedding-004/embeddings", True),
|
||||
],
|
||||
)
|
||||
def test_is_llm_api_route(route: str, expected: bool):
|
||||
|
||||
Reference in New Issue
Block a user