Pydantic V2 @root_validator replaced with @model_validator
Deterministic patch indexed for AI coding agents (Cursor, Claude Code, Cline, Windsurf, OpenDevin).
Root Cause: Use @model_validator(mode='before'|'after').
pydantic fix --latest
Deterministic patch indexed for AI coding agents (Cursor, Claude Code, Cline, Windsurf, OpenDevin).
- @root_validator(pre=True)
- def validate_all(cls, values):
+ @model_validator(mode='before')
+ @classmethod
+ def validate_all(cls, data: Any) -> Any:
curl -X POST https://agentnow.in/api/v1/query \
-H "Content-Type: application/json" \
-d '{"error": "Pydantic V2 @root_validator replaced with @model_validator"}'