Castor oil should be fine for your veggies. It gets mixed reviews re how effective it is, some people swear by it, some not so much. Here's what else I could find. Lots of people say trapping is the best, maybe the only effective method, but the pictures I saw looked like medieval torture devices, so I will leave that to someone else to report on.
"If you have time, you can discourage tunneling moles by thumping an emerging mound hard with a shovel or a broomstick every time you see one being made," "However, moles are active 24 hours a day when tunneling, so not many people can keep up with them."
Flooding mole runs with a hose works well, but you need to stay vigilant, or the moles will simply return. The combination of mound flattening and tunnel flooding can be quite effective
For sheer excitement, consider the "rodenator," a system that injects an explosive gas mixture into mole tunnels. A (licensed) operator then pushes a button that throws a spark and -- kablow! A long line of mole tunnel blows sky high. Check it out online at rodenator.com/videos.htm. It's pretty much a guy thing.
https://www.seattlepi.com/nwgardens/306468_lovejoy10.html
"Put the power of Mother Nature to work for you. Shake-Away Rodent Repellent is a granular formula containing the scent (Fox and Bobcat urea) of the Mole's most feared predators. Mark your territory with an instinctive fear barrier!" I have to wonder about this one since moles are NOT actually rodents. If the makers of this stuff don't even know that, what else don't they know

?
you can repel moles with cat litter or windmills. Dump several scoops of cat litter in the moles burrow and the strong smell will repel the mole. Moles don't like vibrations. You can put commercially available windmills in the mole run. When the wind blows, the windmill spins creating vibrations that repel the moles. An alternative is a child's pinwheel stuck in the run or a glass soda bottle placed open end up. The wind blows causing vibrations...you get the idea. [this is the cheap version of the sonic repellers you can buy]
If you happen to like cats, an outside cat will hunt down and kill your moles. Apparently the moles don't taste very good and your cat won't eat them.
https://articles.glenns-garden.com/Art/2566/93/Organic-Mole-Control-in-Your-Garden.html
You will note considerable variability -- some people say castor oil works, some don't, like wise with flooding, repellant plants like caper spurge and castor bean, juicy fruit gum, etc. I think like everything else in gardening it's pretty individual and depends on your specific situation. You may have to try two or three.