What about a psion 19/illithid savant 7?
Use Metamorphosis to qualify for illithid savant, and illithid savant to get both the metamind's font of power and the spell-to-power erudite's ability to learn powers and spells?
That way you can learn every single non-epic power and spell in the game (so long as you take feats to grab the magic mantle out of CPsi and the Extra Spell feat for spells beyond the wiz/sorc list -- and a thought bottle can grab you tons of xp to learn them with), and you can manifest every single one of them with complete spontaneity. (Note that you have the erudite's learning mechanism, NOT it's UPPD limitation.) With font of power and the Temporal Reiteration power from CPsi, you'll have infinite power points all day long to manifest them. With the Supernatural Transformation feat (once for [psionics] and once for [font of power]), you can be undispellable and ignore SR completely (and since it puts your ML up to your HD, it makes up for losing 8 MLs). If you take the Reserves of Strength feat, that gives you an additional +3 MLs and it breaks the numerical caps on all of your spells.
Then what you do is you cast Gate to pull in a
hagunemnon, Fusion to become one with it, and
Astral Seed while Fused. Then unFuse and kill yourself. You'll come back as a gestalted hagunemnon with 26 character levels and a ML of 44. Use the thought bottle to restore your lost level. Then Gate in a
great wyrm prismatic dragon, Fusion to become one with it, and Astral Seed. Now you're a gestalt entity mixing your original build with hagunemnon with a great wyrm prismatic dragon. Congratulations. Your HD and ML just went up to 78 (and they're DRAGON HD, which are awesome).
Now manifest Ice Assassin (from Frostburn) to create an aleax (from the BoED) of yourself, command it to sit still, and do the Fusion dance with IT, as well. Now you're invulnerable to everything but yourself. And since the ice assassin is under your direct control, command it to kill itself (or to stand by while you do so).
Now you're literally invulnerable to EVERYTHING.