Gender identity is a slightly controversial concept in these parts but it seems to serve a valid purpose in the context of intersex conditions.
Most people with DSDs have differences that do not make them 'between sexes' - they have a genotype (chromosomes) that matches their phenotype (appearance), and the DSD doesn't upset that biological default.
In certain cases a baby may be assigned female at birth despite having a male genotype, as a result of a DSD giving them an ambiguous or even apparently wholly female phenotype.
Whether that assignment is correct depends on the specific biological condition and studies of the gender identities of adults with that condition.
For example, babies who have 5-ARD , which is an XY condition with a lack of dihydrotestosterone, resulting in female appearing genitals at birth, should be assigned male. This decision is not a complicated one - studies show that all 5ARD babies raised as male continue with a male gender identity as adults , while most of those raised as female change to make as adults or teenagers. This is due to testosterone, which is produced in normal male quantities at puberty by these individuals. Testosterone gives children who may have been raised as girls prior to puberty, a male body shape at puberty, and there is no doubt it also affects the brain and behaviour, and the absence of DHT, so important for the formation of genitals in utero, is barely important.
Other conditions may have different outcomes. For example Swyer Syndrome is a condition of XY chromosomes, where people develop an entirely female phenotype. There are no ovaries, but a pregnancy with donated eggs is possible. www.telegraph.co.uk/news/health/news/11381463/Woman-born-with-no-womb-gives-birth-to-miracle-twins.html
Thus 5ARD is unequivocally MALE XY DSD, whereas Swyer Syndrome FEMALE XY DSD.
The case of an athlete with 5ard is not all that much different from a transfemale athlete, in that both have male, as distinct from female, biology
We now know that Caster Semenya has 5ARD, which is a condition of XY males, not XY females. Caster Semenya however identifies as female.
The CAS has said Semenya can compete following androgen reduction therapy. This is identical to the conditions allowed for athletes such as Laurel Hubbard - they are also biologically male and can compete following hormone reduction.
This does not seem a fair or reasonable state of affairs: an athlete such as Semenya who grew up under the full influence of testosterone has a very different body shape from an athlete who went through puberty exposed to oestrogen from their ovaries. There isnt a large difference between Caster Semenya and Usain Bolt on that level. True, Caster Semenya lacks DHT which is a banned performance enhancing steroid in sport, but in normal circumstances the production of testosterone in puberty by a 5ard individual is sufficient for them to spontaneously change their gender identity from female to female, so it would.be rather ludicrous to assert that the pubertal testosterone is not important.
PS All those people claiming that Caster Semenya is a case of racism against black women or whatever, are looking a bit daft now.