Modeling diode connected transistor in differential amplifier
Without more context, I can't answer the question of why different expressions are used but do note that

$$r_e = \frac{1}{g_m}||r_{\pi}$$

so the expressions are, in fact, equivalent.

To see this, recall

$$r_{\pi}= \frac{\beta}{g_m}$$

Thus,

$$\frac{1}{g_m}||r_{\pi} = \frac{r_{\pi}}{\beta}||r_{\pi} =  \frac{r_{\pi}}{1 + \beta} = r_e$$