When it comes to AI, I expect there will be many years between any credible, widely-recognized claim of sentience and the time when more than a few countries recognize "human rights" for them, if it happens at all.
Having sentience is not required for most people to say "this person/entity deserves human rights," and such rights are routinely granted to non-sentient individuals or entities:
We rightfully give legal human rights to people with medical conditions that render them not self-aware and not intelligent in any meaningful way (e.g. newborns with severe anencephaly, who may only have a brain stem and may only live a few minutes), because they part of a larger class (people) who by definition are supposed to have human rights.
We give limited "person rights" to corporations and other legal entities, but they only exist as legal fiction.
We do not give "basic human rights" to primates, dogs, dolphins, octopuses, and other animals even though there are examples of each that are arguably smarter and more self-aware than a typical 4 year old child. Even in the USA, dogs - "Man's best friend" - are routinely killed (albeit humanely) in some animal shelters for no reason other than the shelter they are in is too full.
In some countries and periods of history, we don't even give "basic human rights" to all healthy adults (e.g. repressed political minorities, children, the ill, the elderly, slaves, women, etc.).
In short, being sentient doesn't mean you get legally-protected human rights, and you (rightfully) may get legally-protected human rights even if you, as an individual, are not self-aware and show no signs of being intelligent.