first commit
This commit is contained in:
16
app/api/v1/models.py
Normal file
16
app/api/v1/models.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.database import get_db
|
||||
from app.services.model_service import ModelService
|
||||
from app.datamodels.schemas import ModelPricingResponse
|
||||
|
||||
router = APIRouter(prefix="/models", tags=["models"])
|
||||
|
||||
|
||||
@router.get("", response_model=List[ModelPricingResponse])
|
||||
async def list_models(db: AsyncSession = Depends(get_db)):
|
||||
"""Public endpoint: list available models and pricing."""
|
||||
return await ModelService.list_models(db)
|
||||
Reference in New Issue
Block a user