Start here
The safe first move
Use ConfigDict and model_config for supported keys like extra, from_attributes, populate_by_name, and json_schema_extra.
Stop before automation when: Config.fields and other removed keys. Dynamic Config attributes.
Target shape
from pydantic import ConfigDict
class User(BaseModel):
model_config = ConfigDict(
from_attributes=True,
populate_by_name=True,
)