fix(settings): 补齐CUDA运行组件下载与安装入口

This commit is contained in:
2026-09-05 01:25:43 +08:00
parent 64f63ff1bd
commit c912409343
11 changed files with 284 additions and 3 deletions
+12
View File
@@ -7,6 +7,18 @@ from app.local_models.runtime import RuntimeConfig, configuration, configure, in
router = APIRouter(prefix="/api/local-models", tags=["Local models"])
@router.get("/runtime-components/cuda")
async def cuda_status():
from app.local_models import components
return await components.status()
@router.post("/runtime-components/cuda", status_code=202)
async def install_cuda():
from app.local_models import components
return await components.install()
@router.get("")
async def list_models():
items, diagnostics = await asyncio.gather(asyncio.to_thread(manager.describe), asyncio.to_thread(model_diagnostics.recent))