SubtitleEdit/subtitleedit · critical · PlatformNotSupportedException
llama.cpp download is not supported on this platform.
Error message
llama.cpp download is not supported on this platform.
What it means
Terminal fallback thrown by LlamaCppDownloadService's URL resolver when the OS is neither Windows nor Linux nor macOS. Windows, Linux (x64 + ARM64, CPU/Vulkan/CUDA-with-guards), and macOS (Arm64 + X64) all have URLs; anything else falls through to 'throw new PlatformNotSupportedException("llama.cpp download is not supported on this platform.")'.
Source
Thrown at src/ui/Logic/Download/LlamaCppDownloadService.cs:134
return variant == VariantVulkan
? BaseUrl + "llama-" + ReleaseTag + "-bin-ubuntu-vulkan-arm64.tar.gz"
: BaseUrl + "llama-" + ReleaseTag + "-bin-ubuntu-arm64.tar.gz";
}
return variant == VariantVulkan
? BaseUrl + "llama-" + ReleaseTag + "-bin-ubuntu-vulkan-x64.tar.gz"
: BaseUrl + "llama-" + ReleaseTag + "-bin-ubuntu-x64.tar.gz";
}
if (OperatingSystem.IsMacOS())
{
return RuntimeInformation.ProcessArchitecture == Architecture.Arm64
? BaseUrl + "llama-" + ReleaseTag + "-bin-macos-arm64.tar.gz"
: BaseUrl + "llama-" + ReleaseTag + "-bin-macos-x64.tar.gz";
}
throw new PlatformNotSupportedException("llama.cpp download is not supported on this platform.");
}
}
View on GitHub (pinned to 17a9f07487)
Solutions
- Run on Windows, Linux, or macOS where llama.cpp build URLs are defined.
- If you must support another OS, build llama.cpp for it yourself and supply the binary outside the download path.
- At the caller, detect the unsupported OS up front and disable the llama.cpp feature gracefully instead of letting the call throw at download time.
Example fix
// before
var url = llamaService.GetUrl(variant); // throws on unsupported OS
// after
if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())
{
DisableLlamaCppFeature();
return;
}
var url = llamaService.GetUrl(variant); Defensive patterns
Strategy: validation
Validate before calling
static bool IsLlamaCppSupportedPlatform()
=> OperatingSystem.IsWindows() || OperatingSystem.IsLinux() || OperatingSystem.IsMacOS();
if (!IsLlamaCppSupportedPlatform()) { DisableLlamaCpp(); return; } Type guard
static bool LlamaCppPlatformSupported()
=> OperatingSystem.IsWindows() || OperatingSystem.IsLinux() || OperatingSystem.IsMacOS(); Try / catch
try { var url = llamaService.GetUrl(variant); }
catch (PlatformNotSupportedException ex) when (ex.Message.Contains("not supported on this platform"))
{ _logger.Warning("llama.cpp download unsupported on {OS}", RuntimeInformation.OSDescription); DisableLlamaCpp(); } Prevention
- Constrain the llama.cpp feature to Windows/Linux/macOS in the UI.
- Log OSDescription at startup to detect unsupported environments early.
- Provide a BYO-binary path for unsupported OSes instead of relying on auto-download.
When it happens
Trigger: Running on an OS where IsWindows/IsLinux/IsMacOS all return false — FreeBSD, Solaris, a bare runtime, or a future uncategorized OS. All standard desktop/server OSes are covered, so this is the defensive gate.
Common situations: Unsupported host OS; exotic container runtime; porting to a new OS before URL constants exist. Practically unreachable on the supported matrix (Windows/Linux/macOS, both arches).
Related errors
- Google Lens OCR does not support this platform
- Operation is not supported on this platform.
- llama.cpp CUDA build is not available for Linux ARM64.
- ChatLLM is not available for Linux ARM64.
- Unsupported macOS architecture.
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/fe7f2b7845ad196d.
Report an issue: GitHub.