When do I wean my baby from her 3 AM bottle (if ever)?

Idk if she's actually hungry or just needs it for comfort. Sometimes she won't be comforted with the pacifier and just wants the bottle. Other times she needs the pacifier. She falls asleep on her own at night fine and after eating. So I guess she is actually hungry? She has slept through the night before but it's rare but I know she's capable of it. So do I just keep feeding her when she wakes up until eventually she grows out of it? Or do I try to wean her from it? And if so when? She's 7 months