I'm trying to figure out what is the lowest layer of the OSI model that can be used to extract a bit rate (through a packet sniffer). I'm not sure if it's possible through only the physical layer, or it's necessary to have information about the link layer.
To answer your question as intended, the network card pass to the packet sniffer only valid frames. That means it has already filtered corrupted frame and this is a function of the data link layer (OSI layer 2).
In fact all the physical layer functions (and some of the data link layer functions) are performed by the NIC itself and not by the operating system, so using a standard packet sniffer you can't see what happens at the physical layer. You would need specialized devices to do that.
But actually the answer should be "none", because the OSI model is just that, a model. It is not used in real life.
What is actually used is the TCP/IP model, in which the
Network Access is a single layer that encompass all roles that are separated in two layers in the OSI model:
Note that despite this, even experienced people well aware of the TCP/IP model still split the Network access layer in two, and refer to the IP layer as layer 3 but strictly speaking this terminology is incorrect, and IP should be referred as layer 2
But since most networking courses begin with the OSI model instead of the TCP/IP model, this would cause many confusion.