6. Let the set $I=\{1,2, \cdots, n\}(n \geqslant 3)$. If two non-empty proper subsets $A$ and $B$ of $I$ satisfy $A \cap B=\varnothing, A \cup$ $B=I$, then $A$ and $B$ are called a partition of $I$. If for any partition $A, B$ of the set $I$, there exist two numbers in $A$ or $B$ such that their sum is a perfect square, then $n$ is at least
6. 15 .

When $n=14$, take
$A=\{1,2,4,6,9,11,13\}$,
$B=\{3,5,7,8,10,12,14\}$.
It is easy to see that the sum of any two numbers in $A$ and $B$ is not a perfect square.
Thus, $n=14$ does not meet the requirement.
Therefore, $n<14$ also does not meet the requirement.
Now consider $n=15$.
Use proof by contradiction. Assume that the sum of any two numbers in $A$ and $B$ is not a perfect square.
Without loss of generality, let $1 \in A$.
$$
\begin{array}{l}
\text { By } 1+3=2^{2}, 1+8=3^{2}, 1+15=4^{2} \\
\Rightarrow\{3,8,15\} \subseteq B ; \\
\text { By } 3+6=3^{2}, 3+13=4^{2}, 15+10=5^{2} \\
\Rightarrow\{6,13,10\} \subseteq A .
\end{array}
$$

But $6+10=4^{2}$, which contradicts the assumption that the sum of any two numbers in $A$ is not a perfect square. Therefore, $n=15$ meets the requirement. Thus, the minimum value of $n$ is 15.