It seems like the condition is "threatened", another ally is within 5 feet, and has been damaged with a weapon. So far that's been consistent.
As is, it's a slight nerf to rogue.
Someone else I was talking to on Reddit clarified it has to be a party member. Any other enemies of the target that are threatening it don't count. For the scenario I encountered this makes sense. I hope they fix it since both descriptions of Sneak Attack (5E and BG3) do not specify that it must be a party member that is near the target.