Sounds like a tough spot to be in. I’ve been there myself. I always try to set the appropriate boundaries when I feel things are going too far.
For example, my reply message when he sends me a text will read something like: “Hey Jamie! How are you my friend?” Note the use of “friend” instead of “babe”, “my love” or “sweetheart”. Words matter. You can be polite, friendly and clear without being cold, rude or dismissive. Just one of those skills we pick up as time goes by! ?