On the Bethe ansatz for random directed polymers