The word "relented" (NIV, ESV, NAS) is translated "repented" (American Standard, KJ),
"changed his mind" (NRSV, Message, Good News). God altered his plans because the
people altered their behavior. The same thing is true in Jeremiah 18:8:
"If that nation, concerning which I have spoken, turns from its evil, I will relent of the disaster that I intended to do to it."
This is always true of God responding to a people's repentance by turning from judgment.
God is free to alter his response without having to be placed in the same category as the
typical deities worshipped in the Near East during the days of Jonah and Nineveh (759 BC).
These gods could be manipulated and managed by humans who would meet certain needs
the gods had or appease the gods with rituals. But, the God of Israel was not erratic, could
not be manipulated and certainly did not have any needs.
When the same word that is translated "relented" or "repented" or "changed his mind" in
Jonah 3:10 concerning God's willingness to altering his plan of destruction is used concerning
God's covenant with Abraham, it reads like this:
"God is not human, that he should lie, not a human being, that he should change his mind. Does he speak and then not act? Does he promise and not fulfill?
– Numbers 23:19
"He who is the Glory of Israel does not lie or change his mind; for he is not a human being, that he should change his mind." -1 Samuel 15:29
In both these verses the reference is to God honoring his promise made in a covenant with
Israel. You will not lie or change the covenant he promised. But, that does not mean God
cannot change his mind or alter his plan in response to human behavior, especially when
they are turning away from evil and towards God.