I'm not going to tell my teacher that I'm not going to be his ta next semester, it can be a surprise
Why don't you want your teacher to know?
Because I'm his student in another class
Being a TA comes with responsibilities and respect. Your teacher will find out no matter what happens. Telling him yourself is the mature thing to do.
It's not a big deal, he won't mind that I will be the TA later on.
Even though he will find out eventually, wouldn't you think it'd be kind of you to tell him in advance so he can prepare earlier? It's best to get started on your relationship early so you can get along well!