Who generates the coinbase transaction? As the wiki article says,


  Given just those fields, people would frequently generate the exact
  same sequence of hashes as each other and the fastest CPU would almost
  always win. However, it is (nearly) impossible for two people to have
  the same Merkle root because the first transaction in your block is a
  generation "sent" to one of your unique Bitcoin addresses.]1


Who generates the coinbase transaction?
The coinbase transaction is not relayed by the network. It is invalid except as the first transaction in a block.

A standalone miner generates the coinbase transaction itself. 

In mining pools, the mining pool generates the coinbase, and sends it to the mining client.