$
\let\ss\scriptstyle
\let\sss\scriptscriptstyle
\let\ds\displaystyle
\renewcommand{\+}{\hspace{1mu}}
\renewcommand{\bs}[1]{\boldsymbol{#1}}
\renewcommand{\dt}[1]{\overset{\sss \bullet}{#1}}
\renewcommand{\ddt}[1]{\overset{\sss \bullet \bullet}{#1}}
\renewcommand{\pow}[1]{\raise{.8ex}{\ss{#1}}}
\renewcommand{\a}{\alpha}
\renewcommand{\p}{\partial}
\renewcommand{\r}{\bs{r}}
\renewcommand{\rdot}{\dt{\r}}
\renewcommand{\qdot}{\dt{q}}
\renewcommand{\F}{\bs{F}}
\renewcommand{\L}{\mathcal{L}}
\renewcommand{\deriv}[3]{\frac{{#1}{#2}}{{#1}{#3}}}
\renewcommand{\ddx}[2]{\deriv{d}{#1}{#2}}
\renewcommand{\pdx}[2]{\deriv{\partial}{#1}{#2}}
\renewcommand{\lagrange}[1]{\ddx{}{t} \pdx{#1}{\qdot_\a} \+ - \+ \pdx{#1}{q_\a}}
$
Let me change your notation slightly. Let $q_\a$ be the set of coordinates we use to specify the positions $\bs{r}_i = \boldsymbol{r}_i(q)$ of the planets. Starting with Newton's law, if we introduce virtual work and change our philosophy we arrive at d'Alembert's principle, for which the equations of motion take the form
\begin{equation}
\sum_i (\F_i - m \,\bs{a}_i) \cdot \delta \r_i \; = \; 0
\end{equation}
where $\F_i$ is the force-on and $\bs{a}_i$ is the acceleration-of the $i$th planet. Setting the virtual displacements to $\delta \r_i = \sum_\a (\p\r_i \+ / \+ \p q_\a) \; \delta q_\a $ leads us to the set of $3n$ Lagrange's equations (see Goldstein sec. 1-4)
\begin{equation}
\L_\a[T] = \; F_\a
\end{equation}
where the generalized force $F_\a = \sum_i \F_i \! \cdot \! \pdx{\r_i}{q_\a}$, the kinetic energy $T = \sum_i \frac{1}{2} m_i \bs{v}_i \! \cdot \! \bs{v}_i$, and the Lagrange operator $\L_\a = \lagrange{}$. Let us use a non-script $L$ to denote the Lagrangian. In writing down the equations of motion, we can freely switch between using the forces
\begin{equation}
\F_i = \sum_{j \; : \; j \neq i} \frac{ G \, m_i m_j \, (\r_j - \r_i)}{|\r_j - \r_i|^3}
\end{equation}
and using the potential
\begin{equation}
V = \sum_{i,j \; : \; i<j} \frac{-G \, m_i m_j}{|\r_j - \r_i|}
\end{equation}
The equivalence stems from the fact that the forces can be written as the gradient $\F_i = -\nabla_i V$, which can be used to equate the generalized force to $\L[V]$
\begin{equation}
F_\a \;\; = \;\; \sum_i -\nabla_i V \! \cdot \! \pdx{\r_i}{q_\a} \;\; = \;\; -\pdx{V}{q_\a} \;\; = \;\; \L_\a[V]
\end{equation}
Since $\L$ is a linear operator, we can combine $T$ and $V$ into the Lagrangian $L=T-V$ to arrive at the Euler-Lagrange equations of motion
\begin{equation}
\L_\a[L] = 0
\end{equation}
I often see people claim that Lagrange's or Hamilton's equations are inapplicable when there are forces present that cannot be written as a potential (eg. non-conservative forces). But there is nothing stopping us from leaving the corresponding generalized forces on the RHS. Now, if we want a more explicit expression for the equations of motion we need to choose coordinates. For simplicity, let's use Cartesian coordinates and assume that there are no constraints on the system $\{q_1, q_2, q_3, q_4, \ldots, q_{3n}\} \equiv \{x_1, y_1, z_1, x_2, \ldots, z_n \}$. Non-Cartesian coordinates are best handled with tensor notation -- which I'd rather not introduce in a Stack Exchange post. It is useful to see the vectors expanded out.
\begin{equation}
\begin{array}{rcl}
\r_i &=& q_{3i-2} \+ \bs{i} + q_{3i-1} \+ \bs{j} + q_{3i} \+ \bs{k} \\
\bs{v}_i &=& \qdot_{3i-2} \+ \bs{i} + \qdot_{3i-1} \+ \bs{j} + \qdot_{3i} \+ \bs{k} \\
\F_i &=& F_{i1} \+ \bs{i} + F_{i2} \+ \bs{j} + F_{i3} \+ \bs{k} \\
\end{array}
\end{equation}
The positions only depend on three coordinates so the terms $\pdx{\r_i}{q_\a}$ are nonzero for only three values of $\alpha$ (for which they become $\bs{i}, \bs{j},$ or $\bs{k}$). It is not hard to see that $\L_\a[T]$ are the coordinate accelerations and that $F_\a$ are the force components. Thus, Lagrange's equations $\L_\a[T] = F_\a$ mirror Newton's law
\begin{equation}
m_{i} \ddt{q}_{3i+j-3} = F_{ij}
\end{equation}
where we identified $\a = 3i+j-3$ for convenience. We can condense these $3n$ equations down to $n$ vector equations
\begin{equation}
m_{i} \bs{a}_i = \F_i
\end{equation}
We've come full circle. Indeed, there is really no reason to introduce the Lagrangian at all because: one there are no constraints, two we are using Cartesian coordinates, and three we have explicit expressions for the forces.