I wrote a library to handle a similiar case. pydantic-variants
generating deep nested variants of pydantic models
old question, but if someone finds it useful all the better