15mm pipe at the boiler does not determine "how much gas it can use".
A gate valve in a vent pipe is contrary to British Standards. Take its handle off.
the answer below copied from some months ago covers what you're asking about and more:
Gas pipe sizing:
First, the main the other side of the regulator on the gas meter is at a much higher pressure than the pipe in the house - so it can carry a lot more gas, and its pressure doesn't have to be held to a specific level.
(Think of high voltage cables - thin cables, less current for the same power)
The pressure regulator/governor on the gas meter tries to hold the pressure to 21mbar +/- 1mbar - though that seems to have crept to 22mbar (which helps). Transco only guarantee 14mbar!! ALL gas boilers say they need 20 mbar. Corgi say that there must be no more than 1mbar drop in the pipe between the meter and any appliance, with them all on full.
Nothing in that is a new regulation, it's always been a bit of a nonsense with the Transco guarantee.
Boilers (not all appliances though) have their own gas pressure regulators, which in the past would typically take the 20 ish mbar down to say 14 for the burner. So if the resistance of the gas pipe was a bit too much and the pressure at the input to the boiler was only 17mbar, its regulator would still give 14mbar so all is happy. Except Corgi, who would say the gas supply pipe, droping more than 1 mbar, would be "Not To Current Standard".
If the pressure available was too close to the 14mbar in the example , the regulator wouldn't cope, and the boiler would become "under gassed". To begin with all that would happen would be that the flames would get a bit smaller and the output from the boiler would go down. But if the pressure kept dropping, it would start to affect combustion in a way that could produce carbon monoxide which kills. Yes I have seen it in an extreme case. Corgi therefore decide that if a boiler is under-gassed sufficiently to affect combustion and the reason is that the supply pipe is too small, it is "Immediately Dangerous" and has to be disconnected.
Boilers are changing, particularly condensers. Instead of having say the 14mbar at the input to the burner, many boilers now have negative figures! That's because the fan in the flue SUCKS gas out of the pipe. These boilers are much more fussy about the gas input pressure. It's typical to find that if the pressure is less than say 18mbar, the boiler won't work at all.
So back to the 1mbar. Odyssy's pipe will pass about 1cubic metre per hour of gas, with a 1mbar drop across the pipe. That's enough for about 11kW (37000 Btu/hr) in theory. In practice, burrs on pipe ends, growths inside the pipe where flux was left to attack - whatever, mean you get less than the figure in the book. If you double the rate of gas being taken, you get 3 times the drop in the pipe. SO if you have 20mbar at the meter (often it's a bit less) and lose 3mbar in the pipe, you don't have enough pressure to even light some boilers.
For the length of pipe in the example, 22mm pipe with a 28kW combi boiler would be marginal. So it has to be 28mm.