Let $K$ be some number field, $\mathcal O_K$ denote its ring of integers, and let $n$ be a positive integer. Take $\alpha \in \mathcal O_K$, and consider the quantity $r_{n,K}(\alpha)$, which denotes the number of solutions to the equation $$ \alpha = x_1^2 + x_2^2 + \ldots + x_n^2 $$ with $x_1, x_2, \ldots, x_n \in \mathcal O_K$.

When $K=\mathbb Q$ and $\mathcal O_K=\mathbb Z$, the precise formulas for the computation of $r_{n,K}(\alpha)$ were developed for all $n \leq 4$ (perhaps for other $n$'s as well, but I am not familiar with them). Are there any formulas for $r_{n,K}(\alpha)$ when $[K:\mathbb Q] > 1$? I am especially interested in the cases when $n = 2, 3, 4$ and $K$ is a real quadratic extension of $\mathbb Q$.