{"record":{"id":"5440be8c91146b98","repo":"jamiepine/voicebox","slug":"downloadable-cuda-backend-releases-are-currently-o","errorCode":null,"errorMessage":"Downloadable CUDA backend releases are currently only published for Windows.","messagePattern":"Downloadable CUDA backend releases are currently only published for Windows\\.","errorType":"http","errorClass":"HTTPException","httpStatus":409,"severity":"warning","filePath":"backend/routes/cuda.py","lineNumber":31,"sourceCode":"logger = logging.getLogger(__name__)\n\n\n@router.get(\"/backend/cuda-status\")\nasync def get_cuda_status():\n    \"\"\"Get CUDA backend download/availability status.\"\"\"\n    from ..services import cuda\n\n    return cuda.get_cuda_status()\n\n\n@router.post(\"/backend/download-cuda\")\nasync def download_cuda_backend():\n    \"\"\"Download the CUDA backend binary.\"\"\"\n    from ..services import cuda\n\n    unsupported_reason = cuda.get_cuda_download_unsupported_reason()\n    if unsupported_reason:\n        raise HTTPException(status_code=409, detail=unsupported_reason)\n\n    if cuda.get_cuda_binary_path() is not None:\n        raise HTTPException(status_code=409, detail=\"CUDA backend already downloaded\")\n\n    progress_manager = get_progress_manager()\n    existing = progress_manager.get_progress(cuda.PROGRESS_KEY)\n    if existing and existing.get(\"status\") == \"downloading\":\n        raise HTTPException(status_code=409, detail=\"CUDA backend download already in progress\")\n\n    async def _download():\n        try:\n            await cuda.download_cuda_binary()\n        except Exception as e:\n            logger.error(\"CUDA download failed: %s\", e)\n\n    create_background_task(_download())\n    return {\"message\": \"CUDA backend download started\", \"progress_key\": \"cuda-backend\"}\n","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/jamiepine/voicebox/blob/51f49dea198384b4eb6087b72c17057c6eb1c1cd/backend/routes/cuda.py#L13-L49","documentation":"HTTP 409 raised by POST /backend/download-cuda when cuda.get_cuda_download_unsupported_reason() returns a non-None string. That function returns the constant 'Downloadable CUDA backend releases are currently only published for Windows.' on every platform where sys.platform != 'win32' (i.e. Linux and macOS). The prebuilt CUDA backend archive is only published for Windows releases, so the download endpoint refuses on other OSes.","triggerScenarios":"Calling POST /backend/download-cuda from a Linux or macOS host (or any non-win32 sys.platform).","commonSituations":"Running the app on Linux/macOS and clicking 'Download CUDA backend' in the UI; a cross-platform deployment that assumes the CUDA backend is universally downloadable; Docker container on a Linux image.","solutions":["Run the download flow only on Windows; on Linux/macOS use a CPU backend or build CUDA support locally.","Gate the UI 'Download CUDA' button on the status payload's download_supported flag (GET /backend/cuda).","If CUDA is required on Linux, provision a GPU node with the CUDA toolkit and run the CUDA server binary directly rather than via this endpoint."],"exampleFix":"// before\nawait fetch('/backend/download-cuda', { method: 'POST' });\n// after\nconst status = await fetch('/backend/cuda').then(r => r.json());\nif (!status.download_supported) { alert(status.unsupported_reason); return; }\nawait fetch('/backend/download-cuda', { method: 'POST' });","handlingStrategy":"validation","validationCode":"const status = await fetch('/backend/cuda').then(r => r.json());\nif (!status.download_supported) throw new Error(status.unsupported_reason);","typeGuard":"function isWindowsDownloadSupported(s): s is { download_supported: true } { return s?.download_supported === true; }","tryCatchPattern":"const r = await fetch('/backend/download-cuda', { method:'POST' });\nif (r.status === 409) { const { detail } = await r.json(); /* platform / already downloaded / in progress */ }","preventionTips":["Gate the download UI on status.download_supported.","Only run the CUDA download flow on Windows.","On Linux/macOS, use the CPU backend or provision CUDA externally."],"tags":["cuda","http","platform","unsupported","fastapi"],"backgroundTag":null,"analyzedSha":"51f49dea198384b4eb6087b72c17057c6eb1c1cd","analyzedAt":"2026-08-12T16:51:42.824Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}