# AttributeError: type object 'User' has no attribute 'Config'. Did you mean: 'model_config'?

- **ID:** `python/pydantic-model-config-attribute-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pydantic v1 code using an inner class Config was copied into a v2 project. In v2 the configuration is set via the model_config class attribute with ConfigDict.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   from pydantic import BaseModel, ConfigDict

class User(BaseModel):
    model_config = ConfigDict(extra='forbid', frozen=True)
    name: str
   ```
2. **** (85% success)
   ```
   pip install bump-pydantic
bump-pydantic ./src
   ```

## Dead Ends

- **** — Pydantic v2 ignores the inner Config class entirely; settings silently have no effect and behavior diverges. (80% fail)
- **** — Breaks other v2-only dependencies and pydantic-core bindings; causes cascading import errors across the project. (65% fail)
