# pydantic.errors.PydanticUserError: Field name 'model_config' shadows an attribute in parent 'BaseModel'

- **ID:** `python/pydantic-model-field-name-shadowing`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A user-defined field name collides with a reserved BaseModel attribute such as model_config, model_fields, or model_dump.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   from pydantic import BaseModel, Field
class Settings(BaseModel):
    config: dict = Field(alias="model_config")
   ```
2. **** (90% success)
   ```
   class Settings(BaseModel):
    app_config: dict = Field(serialization_alias="model_config")
   ```

## Dead Ends

- **** — BaseModel is from the Pydantic library; you cannot rename its attributes without forking. (95% fail)
- **** — protected_namespaces controls the model_ prefix warning, not reserved attribute collisions. (80% fail)
- **** — The Python attribute name still shadows the parent, so the error persists at class creation. (70% fail)
