There's no known condition, and this isn't very well researched in the literature.

1. Monro, in his paper on Dedekind finite sets, constructs a model with a proper class of Dedekind finite sets, so AC and DC cannot be forced by a set forcing, but in that model we can do a class forcing and restore choice.

2. The Bristol model is locked between $L$ and $L[c]$, so it can be extended to a model of choice. It is not clear if this extension is a class forcing, and if so, is it definable in the model?

3. If you take Monro's model, or even the Bristol model, and you "do a Feferman-Levy" symmetric extension to make $\omega_1$ singular, then you can still extend to get choice, but you must collapse $\omega_1$.

4. In the Morris model, we cannot extend the model to a model of $\sf AC$ without adding ordinals because we have countable unions of countable sets that can be mapped on increasingly large sets. So, once we well-order everything, all cardinals must be below the continuum. Similarly in the Gitik model, everything has countable cofinality. This gives you an idea about necessary conditions. You need at least a proper class of regular cardinals. You need at least a bound on iterated power sets of sets that would have some fixed cardinality.

5. As a side curiosity, Cohen, Solovay, and ultimately Friedman, showed that if $M$ is a countable model of $\sf ZFC$ of height $\alpha$, it can be extended to a model of $\sf ZF$ of the same height which is uncountable. These models cannot be extended back to models of $\sf ZFC$ without collapsing cardinals *in the universe itself!* Since a countable height implies countable when $\sf ZFC$ holds in the model.