qnli question: Until what century did the Kabul Shahi dynasties rule the Kabul Valley? sentence: The kingdom was known as the Kabul Shahan or Ratbelshahan from 565-670, when the capitals were located in Kapisa and Kabul, and later Udabhandapura, also known as Hund for its new capital.