Domain Error when using Zygote to differentiate MultiStart minimization

I have the following MWE, with most of the code just copied from the MultiStartOptimization.jl documentation:

using Optimization, OptimizationMultistartOptimization, OptimizationNLopt
using Zygote
using ForwardDiff

rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)
f = OptimizationFunction(rosenbrock)

function solve_rosenbrock(p)
    prob = Optimization.OptimizationProblem(f, x0, p, lb = [-1.0, -1.0], ub = [1.0, 1.0])
    sol = solve(prob, MultistartOptimization.TikTak(100), NLopt.LD_LBFGS())
    return rosenbrock(sol.minimizer, p)

Zygote.gradient(x -> solve_rosenbrock(x), [1.0, 1.0])

When running it, I get the error:
ERROR: DomainError with -1: Cannot raise an integer x to a negative power -1. Make x or -1 a float by adding a zero decimal (e.g., 2.0^-1 or 2^-1.0 instead of 2^-1)or write 1/x^1, float(x)^-1, x^float(-1) or (x//1)^-1..

Is it just that MultiStartOptimization is not compatible with Zygote ? Because when I use ForwardDiff instead of Zygote, I do not get any errors. I would really prefer to use Zygote if possible.

Thanks in advance for any help

What’s your goal here? Are you looking to differentiate through the multistart solver?

I wanted to implement a function inside my optimization routine that checks whether my model has a zero (very simplified). And for that I would like to differentiate through multistart. I wonder if it is at all possible. Or if it would be a better idea to just ignore all the derivatives of multistart and just take the result (there is a zero or there is no zero) and differentiate w.r.t. the result.