mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-05 20:28:23 +00:00
fix: add trailing slash routes for /models endpoint
The /models/ endpoint with trailing slash was being caught by the proxy catch-all route instead of the models router, causing 'Model unknown not found' errors. Add explicit routes for both /models and /v1/models with and without trailing slashes.
This commit is contained in:
@@ -403,7 +403,9 @@ async def update_sats_pricing() -> None:
|
||||
|
||||
|
||||
@models_router.get("/v1/models")
|
||||
@models_router.get("/models", include_in_schema=False)
|
||||
@models_router.get("/v1/models/", include_in_schema=False)
|
||||
@models_router.get("/models")
|
||||
@models_router.get("/models/", include_in_schema=False)
|
||||
async def models(session: AsyncSession = Depends(get_session)) -> dict:
|
||||
"""Get all available models from all providers with database overrides applied."""
|
||||
from ..proxy import get_unique_models
|
||||
|
||||
Reference in New Issue
Block a user