Zhang Tianxi (Chinese: 張天錫; 346–406), original courtesy name Gongchungu (公純嘏), later Chungu (純嘏), nickname Duhuo (獨活), formally Duke Dao of Xiping (西平悼公), was the last ruler of the Chinese state Former Liang. He was the youngest son of Zhang Jun (Duke Zhongcheng), and he seized the throne from his nephew Zhang Xuanjing (Duke Jingdao) in 363. During his reign, he claimed vassal status with regard to both Jin Dynasty (265-420) and Former Qin, but eventually, under Former Qin pressure to completely submit, he tried to resist militarily, but could not and surrendered in 376, ending Former Liang. He became a Former Qin official (with the title Marquess of Guiyi (歸義侯)), but after Former Qin's failed attempt to conquer Jin in 383 at the Battle of Fei River, he fled to Jin. Although the Jin imperial government was not happy about some of his actions as the ruler of Former Liang (including his vacillation and his use of an era name), it recognized how his ancestors had long formally held out as a Jin vassal, and Emperor Xiaowu restored him to the title of Duke of Xiping. He died in 406, 30 years after his state was destroyed.
Zhang Tianxi was born in 346, the same year that his father Zhang Jun died, and it is not known whether he was born before or after his father's death. His mother was Zhang Jun's concubine Lady Liu (but see her article on confusion about his mother's identity).
Not much is known about Zhang Tianxi's early life other than that in 354, when his older brother Zhang Zuo formally broke away from Jin, Zhang Zuo created him the Marquess of Changning. Sometime either during Zhang Zuo's reign or that of his nephew Zhang Xuanjing, who became ruler after the violent and arbitrary Zhang Zuo was overthrown in 355, Zhang Tianxi visited the Jin capital Jiankang, and it was this time that his non-standard, three-character courtesy name Gongchungu was apparently joked about, so he dropped the initial character "Gong" and made it Chungu.