From 71446ff9d1493675faf456edd1bf642623b7f95f Mon Sep 17 00:00:00 2001 From: Peter Muller Date: Fri, 7 Jun 2024 09:42:29 -0700 Subject: [PATCH] Deprecate v1 routes in favor of v2 (#23) --- lib/serve/rest-api/src/api/routes.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/serve/rest-api/src/api/routes.py b/lib/serve/rest-api/src/api/routes.py index df1e7617..e6802c0f 100644 --- a/lib/serve/rest-api/src/api/routes.py +++ b/lib/serve/rest-api/src/api/routes.py @@ -28,9 +28,13 @@ security = OIDCHTTPBearer() router = APIRouter() -router.include_router(models.router, prefix="/v1", tags=["models"], dependencies=[Depends(security)]) -router.include_router(embeddings.router, prefix="/v1", tags=["embeddings"], dependencies=[Depends(security)]) -router.include_router(generation.router, prefix="/v1", tags=["generation"], dependencies=[Depends(security)]) +router.include_router(models.router, prefix="/v1", tags=["models"], dependencies=[Depends(security)], deprecated=True) +router.include_router( + embeddings.router, prefix="/v1", tags=["embeddings"], dependencies=[Depends(security)], deprecated=True +) +router.include_router( + generation.router, prefix="/v1", tags=["generation"], dependencies=[Depends(security)], deprecated=True +) router.include_router( litellm_passthrough.router, prefix="/v2/serve", tags=["litellm_passthrough"], dependencies=[Depends(security)] )