Pydantic is now an optional dependency, and the middleware provides proper import guards and fallback behavior if Pydantic is not installed. Updated docs to clarify installation and configuration steps.