diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index c7e0c71bb..470868031 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -647,5 +647,22 @@ async def retrieve_server_log(request: Request): async def home(request: Request): return "LiteLLM: RUNNING" +@app.get("/routes") +async def get_routes(): + """ + Get a list of available routes in the FastAPI application. + """ + routes = [] + for route in app.routes: + route_info = { + "path": route.path, + "methods": route.methods, + "name": route.name, + "endpoint": route.endpoint.__name__ if route.endpoint else None, + } + routes.append(route_info) + + return {"routes": routes} + app.include_router(router)