The transmission has a valve body in there that controls the shifting components, but as far as I know, the engine computer (ECU) controls the shift patterns, this is how the truck does it's automatically adjusting shift patterns depending on the drivers style of driving for saving fuel or more more torque, pretty sure that's all in the ECU... All I can say is, when my ECU went retarded because of the bad ground on my engine (called the ignition system ground), it stopped communicating with the transmission correctly and if I tried to get it to go highway speeds after this by feathering the throttle, it was kicking in and out of incorrect gears and yes, it hit HARD... i mean it was a loud bang, to this day I am VERY surprised my rear differential is working perfectly after that abuse it took when my transmission/ecm went haywire, locker and all still works perfectly smoothly. As soon as that new ECU was put in there, the truck was perfect, oh.. and the new grounds so it didn't happen again, I made them throw me in a transmission, they told me it needed a new transmission, so they ordered one... I told them in the mean time of waiting for the transmission, throw a new ECU in there... it worked perfect, nice smooth shifts, full of power, brand new, had them put the new transmission in anyways. It was just a bad little situation for my truck, doesn't happen often, little stupid bad ground and the dealership was just lost and didn't know what to do, I felt like I did more thinking work than they did.
Just have them check simple things first, Reset the ECU, clean the battery terminals, try a different battery, look at all the major grounds (left of the battery bolted to the body, to the right of the air box bolted to the body, the top of the engine, right side towards the front of the truck, near the alternator on the engine block, etc)...
When my rodeo had a bad ground cable that I hadn't realized i screwed up on the battery after I installed my power inverter for using tools at work, that transmission went stupid also, same ignition system with coil/plug, same ECM/TCM setup, it kept shifting hard only randomly, when I went to accelerate.. it was just .. BOOOOOM! .. scared the hell out of me... after a while of tinkering, seem my ground was so loose it was barely touching, bolted er' back up, it's been 70k miles since and she shifts perfectly smooth.