Is it a Raymarine ST4000?
If so I had the small roll pin break in my lever that engages the autopilot. When the pin broke it was engaged and the break caused the pilot to NOT disengage!! Parts were difficult to impossible to find as they have stopped making this model. All any dealers could tell me was to spend $1500 and upgrade the whole system to the new model.
I ended up buying a pin from a fastener supply place, drilling new holes and inserting a new pin in a new location. I think, unless you can find an old unit to use for parts, you are looking at manufacturing something from scratch. Good luck. You can still buy a new cogged belt that you should replace if you get the lever fixed.