Haha phew, thank god. Personally I find Valium synergises better with codeine than Xanax anyway. If you have a high tolerance to both then you should be alright, but I'd still reduce your regular dose you would take individually of each a little though as they do potentiate each other and add to said respiratory depression. 500mg of codeine and 10mg of Valium is a very high dose, if 500mg is your normal codeine dose I wouldn't go above 400mg with the Valium, even less if you want to be safe (most people would say half your regular codeine dose). Also there's no harm starting out with a smaller dose of Valium to test the water, just take half and you can always take more later, but I certainly wouldn't go above 10mg with that dose of codeine.
Hope this helps.