The narrative foundation is laid in Bereishit 16:10–12, where the angel announces to Hagar that her son shall be called Yishmael — meaning 'God has heard' — because God paid heed to her suffering, and that he would be a wild and combative figure dwelling alongside all his kin.
Rashi (Bereishit 16:12) explains the characterization of Yishmael as a 'wild ass of a man' by noting that he loved the wilderness and hunting, as the later verse describes him dwelling in the desert and becoming an archer.
Bereishit 17:18–21 records God's response to Avraham's plea on Yishmael's behalf — that God blessed him, would make him exceedingly numerous, and would establish him as father of twelve chieftains and a great nation, though the covenantal line would pass through Yitzchak alone.
Tzidkat HaTzadik 78 offers a theological framing: it is possible for wicked children to yield some benefit to their father, and Yishmael along with the children of Keturah served Avraham in this capacity by drawing off the 'dross,' allowing the spiritual essence to be concentrated in Yitzchak.
Likkutei Sichos 1, Lech Lecha develops this further, contrasting Yishmael's natural, intellect-based connection with Yitzchak's supernatural and transcendent bond, and arguing that Yishmael represents a level of spiritual engagement that had to be surpassed rather than inherited.
Or HaChaim (Bereishit 17:20) reads Avraham's prayer for Yishmael as a plea that he become righteous, and understands God's blessing of Yishmael as a hint that he would ultimately do teshuvah — since blessing means being included in the source of holiness.
This theme of teshuvah is grounded in Bava Batra 16b, which counts among the blessings of Avraham's final years the fact that Yishmael repented in his father's lifetime, and the Gemara derives this from the order in which Yishmael and Yitzchak are listed at Avraham's burial.
The Ramban (Bereishit 21:11) clarifies that Avraham's great anguish at being told to send Yishmael away stemmed not from attachment to Hagar but entirely from his love for his son — Scripture, the Ramban argues, deliberately frames it this way to honor Avraham.
Kli Yakar (Bereishit 21:10) explains that Sarah's insistence on expulsion was similarly son-focused: she feared that Yitzchak would learn from Yishmael's corrupt conduct, conduct she traced to his Egyptian maternal lineage.
אלשיך, בראשית כה כ underscores the ultimate distinction: Yishmael is not reckoned among Avraham's true offspring in the covenantal sense, since Scripture declares that only through Yitzchak is Avraham's seed called, making Yishmael's role in the narrative one of contrast rather than continuation.