Skip to content

Commit

Permalink
Deprecate v1 routes in favor of v2 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
petermuller authored Jun 7, 2024
1 parent 88a64e0 commit 71446ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/serve/rest-api/src/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down

0 comments on commit 71446ff

Please sign in to comment.