I want to solve a general nonlinear constrained optimization problem $$\min_q\ f(q)\quad \textrm{s.t.}\quad g_i(q) = 0,\ h_j(q) \geq 0.$$ The problem is that while the equality constraints $g_i(q)$ are individually smooth and have non-vanishing gradients at feasible points, the gradients are not linearly independent. If they were algebraically dependent I could simply remove the redundant constraints, but unfortunately the rank of $\nabla g$ is not constant over the feasible set.
What is the standard approach to solving such problems? Are there higher-order analogues of the KKT conditions that can be used instead, and are there standard solvers that are based on them?