Artoomis' suggestion of using a creature's ECL to determine what magic item it can create is a very good one.
And to the folks who are saying an over-reaching wish should reward the player in some way, or at the very least not be twisted:
The wish spell dictates what can be wished for safely. Wish for that, and you are probably good. If you wish for something more than that, the spell states that "such a wish gives the DM the opportunity to fulfil your request without fulfilling it completely. (The wish may pervert your intent into a literal but undesirable fulfillment or only a partial fulfillment.)"
The DM twisting an over-reaching wish is following the
rules.
Here's how I'd handle some various wish methods:
#1. You are a caster wanting to cast an over-reaching wish. I'd have you make a spellcraft check (DC19) and, if successful, tell you that your wish will not come out as you are intending it to. It might only be partially fulfilled, or it might be twisted into something you don't want.
If you still cast the wish, then you are asking for trouble. But you are certainly still welcome to do it.
#2. You are a caster who has bound an evil creature and are attempting to bargain with/force it to grant you an over-reaching wish. Such a creature will do its best to mess with your wish. An appropriate knowledge or sense motive check will reveal this to you.
If you still cast the wish, then you are asking for trouble.
#3. You are a caster who has bound a good creature and are attempting to bargain with/force it to grant you an over-reaching wish. If lawful, the creature will flat out tell you that it cannot guarantee that your wish will come out as desired. If the wish is particularly wonky, the creature will most likely not grant such a thing voluntarily. If chaotic or neutral, the creature will tell you that your wish probably won't come out how you want it to, but heck, let's try it and see what happens!
If you still cast the wish, then you are asking for trouble.
#4. You are casting/forcing someone to cast an acceptable (PHB list) wish on a fairly regular basis. Have you ever heard of a Quarut? No? Well, they protect reality and the timestream. And thanks to your efforts, they've heard of you. They also don't take too kindly to fools who alter reality willy-nilly.
If you still cast/force someone to cast wishes on a regular basis (I'd give you an appropriate knowledge or spellcraft check to have an idea), then you are going to be hunted down and rendered incapable of doing it anymore (usually death).