The introduction to Jeniffer Liu's 2016 thesis The Problem of Philosophy in Classical Chinese Thought goes in depth into the genesis of Chinese terms associated with philosophy, and shades of meaning surrounding them. The older term that referred to the works of classical masters was zǐ shū, but its identification with philosophy is controversial:
"A recent study by Wiebke Denecke has proposed to view the works of the pre-Qin “masters” (諸子 zhūzǐ)
as ‘literature.’ She rightly notes that ‘Chinese philosophy’ was first and foremost a Jesuit invention stemming from their pioneering efforts to translate the Chinese Classics. Denecke then takes pains to illustrate the problematics of translating the zhūzǐ as ‘philosophy’ (mostly by a somewhat superficial and at times misleading understanding of the history of philosophy as well as a rather outdated knowledge of the field of philosophy today) advocating instead for viewing “Masters literature” as a “discursive space.” In explaining why “literature” is a more fitting designation than
“philosophy,” she gives two reasons: “because it [i.e. zǐ shū 子書 ‘masters literature’] was coined relatively soon
after the pre-Qin period in the Han and because it was an indigenous label rather than one developed in comparison
to and competition with the vastly different Greco-Roman heritage…” While her desire to break free of labels
is commendable, and while it is perfectly acceptable to want to open up new ways of looking at the zhūzǐ, it is never entirely clear how Denecke wishes to define the genre of “literature,” nor does she give convincing arguments as to why “Masters literature” is more suitable than “Masters philosophy.”"
As mentioned in the comments, the modern term is Zhéxué jiā:
"As a noun, the word zhé means “illuminated wisdom; the possession of
wisdom,” and in definition (2) meaning “one who is worthy and perceptive/clear-sighted.” Taken
together with 學 xué “learning, study,” we can understand it as “the study of illuminated wisdom”, or “the study of the worthy/wise person”— study here meaning to learn by observing and
imitating."
But its origins are recent and influenced by Europeans. Zhéxué is the translation of Japanese tetsugaku coined by Nishi Amane, and promoted by Meiji Period intellectuals, who sought to modernize Japan in the Western direction. By the late 19th century the term was used at the Tokyo university as the translation of "philosophy". Huáng Zūnxiàn (1848-1905), a Chinese diplomat in Japan, rendered tetsugaku as zhéxué after observing its use there. Peking University offered zhéxué courses since 1918, and the older masters, like Confucius, were subsumed under the term:
"The role of the Meiji intellectuals in shaping the Chinese view of ‘Chinese philosophy’ cannot be
underestimated. Yet what was initially a Japanese translation of the Western term ultimately
evolved into a larger question of what kinds of thought could be subsumed into a somewhat
abstract understanding of ‘philosophy’... Many Meiji scholars had studied abroad in European countries, and were exposed to the philosophy curriculum therefrom. This meant exposure to philosophy as an academic discipline,
which included subjects such as logic, epistemology, methodology, et cetera.
[...] The first person officially known to coin the term using the two Chinese graphs 哲學 was the Japanese scholar Nishi Amane 西周 (1829-1897)... he seemed ambivalent as to whether what he ultimately called
tetsugaku should be restricted to the Western discourses, or if it should entail Eastern thought as
well. Initially, Nishi had referred to “philosophy” as the Western tradition of “the study of
human nature and the principles of things” (seiri no gaku 生理之學), the terminology reminiscent of Neo-Ruism. Around the same time, in the Hyakugaku renkan 百学連環 he
called it kitetsugaku きてつがく [希哲学]and hirosohi ヒロソヒvariously, in the sense of to love and
seek wisdom. Elsewhere, he seems to want to equate it with the Western branch of logic. By
1874 he refers to ‘philosophy’ consistently as tetsugaku throughout his works...
Nishi identifies philosophy with a specific school of thought in
China, Ruism, and this appears to be what he has in mind here when comparing the two
traditions. Ostensibly for Nishi, the Japanese version of Ruisim would be the Eastern counterpart
to Western philosophy... As part of the academic curriculum, we see that by the late nineteenth century the prestigious Tokyo Imperial University 東京帝國大學 had included Shina tetsugaku 支那哲學
(Chinese philosophy) as a distinct discipline, belonging to the department of Japanese and
Chinese Literature and Philosophy.
[...] The first Chinese scholar to bring back the concept of tetsugaku, now uttered as zhéxué in
Chinese, was Huáng Zūnxiàn 黃遵憲 (1848-1905), a diplomat sent to Japan where he had
observed the academic divisions of Tokyo Imperial University. One such division of relevance
was the Faculty of Letters 文學部, which was further divided into three sections 科, tetsugaku
being one section. Huáng explained zhéxué as that which explicated the “norms of the way” 道
義. China soon followed suit, with Peking University being the first to establish a zhéxué xì 哲
學系 in 1918...
Compilations of the history of a
Chinese philosophy began in Japan at the end of the nineteenth century, and were picked up and
modeled after by the Chinese.34
We see this convention of designating the Masters as ‘philosophers’ beginning with at
least Hu Shih, Fung Yu-lan, and others from the early twentieth century. It is interesting to note
that the zhūzǐ seem to more often be considered as philosophical whereas the jīngdiǎn less so,
with the exception of the Lúnyǔ 論語 and the Mēngzǐ 孟子,the latter of which can be
considered to belong to the Masters".