This usually happens in Pydantic v2, where .model_dump() is a method available on Pydantic model instances, not plain dictionaries.