Current behavior: for pipes at the factory boundary, the output direction is used by defaults. And player should rotate them to change its direction.
Recommended new behavoiur — if the game uses the Flow Control mod (https://mods.factorio.com/mod/Flow%20Control) :
if we have VALVE pipes from the mod (or its successor with the same entity names), use direction from these VALVE entities.
Even better: support all entities based on pump entity that connected to the factory boundary (it already support them), BUT check the direction of the pump (and its derivatives). I mean auto rotate input/output pipe connection based on orientation of the pump.