The AI does place a high value on mana. When they offer Corn for Fire they are trying to cheat you. Try to get the AI to give you a mana resource while only offering the AI non-mana resources in return and you'll get an idea of how much the AI values mana...
The AI isn't trying to "cheat" you.
Now I don't know the exact mechanics of it as relates to the programming, but I've discerned the situation to seem to be like this:
1. The AI checks to see if you have a resource it would want from you (every turn), that you also have a spare of. Just like you don't see an unallied/vassaled AI's resource when it has only one of it, the AI assumes that any resource you have only one of is something you wouldn't trade. Hence, when you suddenly acquire that 2nd mana of the same type, the check comes back positive.
2. The AI checks to see if it has something to trade in return. Any spare resource, or possibly just gold per turn.
3. This is the key part. The AI first puts ITS resource on a "weighing scale", or you could call it deficit. The AI then puts the first resource it wants from you on that scale, followed by the second, third, etc. UNTIL that scale passes the balance point or eliminates the "deficit" EVEN IF ADDING THAT LAST RESOURCE MASSIVELY TIPS THE TRADE in the AI's favor. It then considers the trade "fair" and pops up to ask you.
Example, making up numbers:
Let's say the AI has spare wheat, corn, gems, and gold. They're worth (made up numbers inc) 5, 5, 20, and 20 gold per turn. You have spare Fire mana valued at 50 gold per turn. The AI checks that you have a spare resource it wants (you do) and that is has a spare resource you could use (it does). It chooses its corn first and puts it on the scale, and now considers you to owe 5 gp/turn for the trade. It selects the first resource it wants from you (the Fire) and now you've met or exceeded the deficit it created, so it says "ok, good trade", even though you actually surpassed it by 45 gp/turn.
Now when you say no way and re-do the terms of the trade, you're doing the process in reverse, which gets you a much better deal. You're offering the Fire mana, which creates a 50 gp/turn deficit. The AI then checks its own resources in order to balance that out. It says 'Ok, I'll add the corn, that's 5, still need more, add the wheat, still need 40 more, add the gems, then the gold, now we met the deficit" and says okay. Now you have a much better trade. The difference is, doing it in reverse, the AI will try NOT to exceed the deficit.
The same behaviour occurs with tech trades. Ever wonder why the AI offers really, really bad tech trades at times, even when a more balanced one might exist?
Example: AI has techs worth 600, 600, and 600 beakers (made up numbers again). You have techs worth 400, 1200, and 1800 beakers. The AI makes the same checks - do you have a tech it wants (yes), does it have a tech you can learn (yes). It puts its 600 beaker tech up for trade. You "owe" it 600 in tech before it will accept. It wants your 400 beaker tech, but that's not enough, so it asks for your 1200 next, which surpasses the deficit, even though it pushes it greatly in the AI's favour. If you decline and say "what would make this deal work?" the AI will slot in another 600 tech but NOT the 3rd, as again, in reverse, it doesn't want to exceed *your* deficit. If you decline again, though, and remove your 400 tech, it will consider the 600 and 600 against 1200 to be fair. If you decline still, and remove all techs then offer your 1800, it'll throw up all 3 of the 600's to match it.
Again, you can see the same thing with just pure gold being offered for tech. The AI might only have 10 gold to trade and will offer that for your "Stirrups" even though that is ridiculous. If the AI actually has a decent supply of gold, it actually will come to you with semi-decent trades, and will offer them in return if you ask "what will you give me for this tech". If you both have a decent set of techs that are near the same beaker level, the trades the AI pops up with are more likely to be fair.
That's just the general guideline I figured out (it was true in BTS and works here. The major difference is just how valued mana is). Obviously, a slough of other factors can modify things, like individual AI valuing of techs it wants for its overall plan, whether a tech is a major combat addition, how much the AI likes you, etc. So the main point? Always double check the costs involved in the trade and be ready to hit refusal followed by "what would make this fair".