Looks like pydantic has deprecated accessing model_fields from instance.
PydanticDeprecatedSince211: Accessing the 'model_fields' attribute on the instance is deprecated. Instead, you should access this attribute from the model class. Deprecated in Pydantic V2.11 to be removed in V3.0.
batch_model_fields = [*list(updated_batch.model_fields), "_ordered_jobs"]
Update _ordered_jobs attribute logic accordingly.