LangChain just dropped version 1.3.2, and it's a focused release that tightens middleware functionality. The team added real-time PII redaction for streaming outputs, fixed a subtle bug in TodoListMiddleware, and made middleware stream transformers easier to register. These changes may seem small, but they matter for anyone building production-grade LLM chains.
First up, PIIMiddleware now redacts personally identifiable information in flight during streaming. That means if your chain streams output token by token, sensitive data gets masked before it ever reaches the client. No more waiting for full responses to sanitize—this is real-time privacy. The new redact_streamed_pii flag controls it.
Meanwhile, TodoListMiddleware got a fix: the 'final answer' now lands in the last AIMessage instead of being dropped. Previously, users reported that the last response went missing when using this middleware for task management. That's gone.
Also, the team registered stream transformers directly on middleware via a new method. This simplifies building custom middleware that transforms streaming data, like RedactStreamTransformer.
On the infrastructure side, they bumped the langchain-tests floor to 1.1.9 and updated the idna dependency for security. Standard stuff, but it keeps the stack clean.
These aren't flashy features—they're quality-of-life improvements for developers. PII redaction during streaming is a big deal for compliance. If you're building a customer-facing chatbot with LangChain, you can now safely stream responses without worrying about leaking credit card numbers or email addresses.
The TodoListMiddleware fix? It's a classic edge case that could break apps relying on sequential task execution. It's fixed now, and that's one less headache for teams building with the popular pattern.
Registering stream transformers on middleware simplifies the developer experience. Instead of monkey-patching, you can now hook into the streaming pipeline cleanly. That's the kind of ergonomic improvement that adds up over time.
So yes, 1.3.2 is a minor bump. But for anyone wrestling with real-time streaming or middleware quirks, it's exactly the kind of release that keeps LangChain humming.
Official Source: https://github.com/langchain-ai/langchain/releases/tag/langchain%3D%3D1.3.2