My way of thinking is that the trainer would only be entitled to a commission if they found a buyer for the horse or if they had put in work for free in schooling it.
If they charge for schooling it then they are paid to do a job of work and not entitled to a commission although, if I were the seller I would probably give them a 'drink' if it sold well.
If you were to purchase the horse then it is up to the owner to pay any commission and not the buyer. However, if the trainer spent time looking at several horses for you I would expect them to be paid for their time not a commission.
I have bought several horses for clients. Generally they left me to to the dealing. My agreement with them would be that whatever money I saved them would be split 50/50 so, of a horse was 10,000 and o got it for 9.000 I would get 500.
You could liken it to a car.
You buy an old car, take it to a mechanic for restoration, they do a good job and you sell it. The mechanic is not entitled to a commission for his work.