mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
check is_llm_api_route
This commit is contained in:
parent
b54b1d958b
commit
b64755d2a1
3 changed files with 12 additions and 9 deletions
|
@ -46,7 +46,7 @@ def route_in_additonal_public_routes(current_route: str):
|
|||
return False
|
||||
|
||||
|
||||
def is_openai_route(route: str) -> bool:
|
||||
def is_llm_api_route(route: str) -> bool:
|
||||
"""
|
||||
Helper to checks if provided route is an OpenAI route
|
||||
|
||||
|
@ -59,6 +59,9 @@ def is_openai_route(route: str) -> bool:
|
|||
if route in LiteLLMRoutes.openai_routes.value:
|
||||
return True
|
||||
|
||||
if route in LiteLLMRoutes.anthropic_routes.value:
|
||||
return True
|
||||
|
||||
# fuzzy match routes like "/v1/threads/thread_49EIN5QF32s4mH20M7GFKdlZ"
|
||||
# Check for routes with placeholders
|
||||
for openai_route in LiteLLMRoutes.openai_routes.value:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue