I am glad to announce that you can now use reverse-mode automatic differentiation (AD) packages such as Zygote and ReverseDiff in the JuliaSmoothOptimisers ecosystem. This is part of an effort towards an AD-based first-order augmented Lagrangian framework which is close but not there yet. Here is the syntax for defining a model that makes use of Zygote:
I realised my initial suggestion doesn’t actually end up using Zygote, so I made an edit. But I would use @tmigot’s suggestion anyways since he is a core dev of the package and I am not.