Panels have an Isc rating. No way will they produce more than that.
Most certainly every solar set up should have wire to easily handle the Isc rating and most go double or more to reduce voltage losses.
12 gauge will handle 45 amps with 105C insulation unbundled. Again nobody will use this wire due to voltage drop.
18 gauge will go 20 amps and probably have so much resistance it would survive just fine. Again nobody is installing #18 wire to feed 23 amps of solar to the controller.
If you have doubts, short the wires all day in the bright sun before you install. The only heat you will see is from the sun hitting the wires.