janhq/jan · error · Error

Extension does not support CUDA runtime installation

Error message

Extension does not support CUDA runtime installation

What it means

Thrown in `installCudaRuntime` when `getByName('llamacpp-extension')` returns null OR the returned extension lacks `installCudaRuntime`. Unlike install/update, there is no fuzzy fallback here — only the exact name lookup. CUDA runtime install is a Windows/NVIDIA-only capability.

Source

Thrown at web-app/src/hooks/useBackendUpdater.ts:455

      // refreshBackendOptions (just rewrites the dropdown options); fall
      // back to the heavy configureBackends path for older extensions.
      if (extension.refreshBackendOptions) {
        await extension.refreshBackendOptions()
      } else {
        await extension.configureBackends?.()
      }
    } catch (error) {
      console.error('Error installing backend:', error)
      throw error
    }
  }, [])

  const installCudaRuntime = useCallback(async (filePath: string) => {
    const extension = ExtensionManager.getInstance().getByName(
      'llamacpp-extension'
    ) as LlamacppExtension | undefined
    if (!extension || !('installCudaRuntime' in extension)) {
      throw new Error('Extension does not support CUDA runtime installation')
    }
    await extension.installCudaRuntime?.(filePath)
  }, [])

  return {
    updateState,
    checkForUpdate,
    updateBackend,
    setRemindMeLater,
    installBackend,
    installCudaRuntime,
  }
}

View on GitHub (pinned to fad3f12a14)

Solutions

  1. Confirm you are on Windows with an NVIDIA GPU (CUDA runtime install is platform-gated).
  2. Update the llamacpp extension to a version that ships `installCudaRuntime`.
  3. Hide the CUDA runtime install UI when the capability is absent.

Example fix

// before
if (!extension || !('installCudaRuntime' in extension)) {
  throw new Error('Extension does not support CUDA runtime installation')
}

// after
if (!extension || typeof extension.installCudaRuntime !== 'function') {
  throw new Error(
    'CUDA runtime installation is not supported by the installed llamacpp extension (requires Windows + NVIDIA).'
  )
}
Defensive patterns

Strategy: type-guard

Validate before calling

const ext = ExtensionManager.getInstance().getByName('llamacpp-extension')
if (!ext || typeof ext.installCudaRuntime !== 'function') {
  toast.error('CUDA runtime install unsupported', { description: 'Requires Windows + NVIDIA and a current llamacpp extension.' })
  return
}

Type guard

function supportsCudaRuntimeInstall(ext: unknown): ext is { installCudaRuntime(filePath: string): Promise<void> } {
  return !!ext && typeof (ext as any).installCudaRuntime === 'function'
}

Try / catch

try {
  const ext = ExtensionManager.getInstance().getByName('llamacpp-extension')
  if (!supportsCudaRuntimeInstall(ext)) {
    toast.error('CUDA runtime install unsupported', { description: 'Windows + NVIDIA + current llamacpp extension required.' })
    return
  }
  await ext.installCudaRuntime(filePath)
} catch (error) {
  console.error('installCudaRuntime:', error)
  throw error
}

Prevention

When it happens

Trigger: Calling `installCudaRuntime(filePath)` when the llamacpp extension is missing, or when the installed version does not implement CUDA runtime installation (non-Windows build, older version, or CPU-only build).

Common situations: Invoked on macOS/Linux where the extension never ships `installCudaRuntime`; llamacpp extension disabled; NVIDIA toolkit integration added in a newer extension version than installed.

Related errors


AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12). Data as JSON: /api/errors/32a88aee266eb475. Report an issue: GitHub.