Port to Pydantic 2
Now that we require trixie, we should stop using the `pydantic.v1` compatibility layer and [migrate to Pydantic 2](https://docs.pydantic.dev/dev/migration/) properly. This is especially important since the v1 compatibility layer no longer works with Python 3.14, so it's going to start failing for us in forky relatively soon.
issue