Added pydantic v2.5 support.