In Matthew 15:26 the the Greek word κυνάριον [perhaps “little dog” or “beloved dog”] is a diminutive of κύων [dog]. The diminutive can indicate size or affection, but it doesn’t always have this effect.
According to Jonathan Watt in “Diminutive Suffixes in the Greek New Testament: A Cross Linguistic Study,” the diminutive can also serve the function of politely softening the edges of a conversation, especially when there is social distance between the speaker and the listener. This could certainly be the case between Jesus and the “Canaanite” woman.
It can also “express solidarity and common values in certain speech communities, and may be doing so in some New Testament passages.” In this case, Jesus would be using the word in a satirical sense that undermines its social power. Jesus uses the language of the commonly accepted framework [Gentiles are like dogs], but “diminishes” it with the use of the diminutive suffix.