Skip to content

Commit 1acb425

Browse files
committed
feat(api): add /v1/ prefix to proxy and rapidapi routes
- Register proxy router with /v1 prefix - Register rapidapi router with /v1 prefix - Keep legacy routes without prefix as deprecated - Endpoints: /v1/proxy/http, /v1/proxy/llm
1 parent e267f35 commit 1acb425

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/main.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,14 @@ def _register_routes(app: FastAPI) -> None:
268268
from reliapi.app.routes import health, proxy, rapidapi
269269

270270
app.include_router(health.router)
271-
app.include_router(proxy.router)
272-
app.include_router(rapidapi.router)
271+
272+
# v1 API routes (canonical)
273+
app.include_router(proxy.router, prefix="/v1")
274+
app.include_router(rapidapi.router, prefix="/v1")
275+
276+
# Legacy routes (deprecated - will be removed in 6 months)
277+
app.include_router(proxy.router, deprecated=True, tags=["Legacy"])
278+
app.include_router(rapidapi.router, deprecated=True, tags=["Legacy"])
273279

274280
# Import and register business routes
275281
try:
@@ -295,6 +301,7 @@ def _register_routes(app: FastAPI) -> None:
295301
logger.warning(f"Business routes not available: {e}")
296302

297303

304+
298305
# Create the application instance
299306
app = create_app()
300307

0 commit comments

Comments
 (0)