# fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'models.User'> is a valid Pydantic field type

- **ID:** `python/fastapi-route-name-conflict-openapi`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing a non-Pydantic class as response_model, or a Pydantic v1 BaseModel under v2.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100.x | active | — | — |
| 0.110.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   class UserOut(BaseModel):\n    id: int\n    name: str
   ```
2. **** (85% success)
   ```
   class M(BaseModel):\n    model_config = ConfigDict(arbitrary_types_allowed=True)\n    obj: MyClass
   ```

## Dead Ends

- **** — Removes OpenAPI schema; clients lose type info. (70% fail)
- **** — Pydantic v2 uses __get_pydantic_core_schema__; v1 hook ignored. (80% fail)
