How to know the mbed os version used in platformio

i am searching for a way to know the version of the mbed os used in platform io? intention is to start experimenting with the codio and bluetooth 5.2 stack.

The used mbed-os version is shown at the start of the compilation process.

Processing disco_f051r8 (platform: ststm32; board: disco_f051r8; framework: mbed)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
HARDWARE: STM32F051R8T6 48MHz, 8KB RAM, 64KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
 - framework-mbed 6.51504.200716 (5.15.4)
 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
Collecting mbed sources...

So 5.15.4 in this case, for a configuration of

platform = ststm32
board = disco_f051r8
framework = mbed

note that there was a recent split where smaller (in flash / RAM) boards only support up to mbed-os 5 now with the bigger ones using the later mbed-os 6 versions.

But there should be no decrease in features, so I think your Bluetooth stack and all should also be contained in newer mbed-os versions.

Also note that you can change the used mbed-os package using a different platform = someplatform@version version, depending on the used platform (nordic nrf52 or stm32 or whatever). . The release notes tell you the used mbed-os version.