Rather than trading tech outright, could we not introduce a system whereby you can acquire 'licenses' from other races. The license gives you all the direct benefits of the technology in question, but cannot be traded and does not progress you up the tech tree - you must research it yourself to unlock those things. You could give a 25% discount to the technology for having the license.
This would have a lot of benefits - it'd be much harder to exploit the AI for tech trades, since brokering is pretty much impossible. It'd mean that being gifted a crap tech specialization no longer prevents you from researching one you actually want. It'd still be worth trading for techs based purely on the bonuses granted and the discount later, but the system as a whole is much less subject to abuse.
It could even be turned into a treaty form - I might want to license Doom Rays to AI 17 while he's at war with my big rival, but then want to rescind it later when I decide to go to war with him myself. This would certainly make diplo a bit more involved.