Avatar for the langchain-ai user
langchain-ai
langchain
BlogDocsChangelog

feat(langchain): redact streamed PII in flight on `PIIMiddleware`

#37616
Comparing
nh/pii-middleware-stream-redaction
(
8b20e6f
) with
master
(
aef86c4
)
CodSpeed Performance Gauge
0%
Untouched
2
Skipped
13

Benchmarks

15 total
test_create_agent_instantiation
libs/langchain_v1/tests/benchmarks/test_create_agent.py
CodSpeed Performance Gauge
0%
4.1 ms4.1 ms
test_create_agent_instantiation_with_middleware
libs/langchain_v1/tests/benchmarks/test_create_agent.py
CodSpeed Performance Gauge
0%
15.2 ms15.2 ms
test_import_time[HumanMessage]
libs/core/tests/benchmarks/test_imports.py
Skipped
675.5 ms*
test_import_time[InMemoryVectorStore]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.5 s*
test_import_time[tool]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.4 s*
test_import_time[RunnableLambda]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.3 s*
test_import_time[CallbackManager]
libs/core/tests/benchmarks/test_imports.py
Skipped
815.9 ms*
test_import_time[LangChainTracer]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.2 s*
test_import_time[Runnable]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.3 s*
test_import_time[PydanticOutputParser]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.4 s*
test_import_time[BaseChatModel]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.5 s*
test_import_time[InMemoryRateLimiter]
libs/core/tests/benchmarks/test_imports.py
Skipped
377.5 ms*
test_import_time[ChatPromptTemplate]
libs/core/tests/benchmarks/test_imports.py
Skipped
1.7 s*
test_async_callbacks_in_sync
libs/core/tests/benchmarks/test_async_callbacks.py
Skipped
59 ms*
test_import_time[Document]
libs/core/tests/benchmarks/test_imports.py
Skipped
419.7 ms*

Commits

Click on a commit to change the comparison range
Base
master
aef86c4
+0.06%
feat(langchain): redact streamed PII in flight on `PIIMiddleware`
5a1d033
6 hours ago
by nick-hollon-lc
+0.01%
refactor(langchain): drop whitespace-boundary flush from `PIIMiddleware` stream transformer
06e8c99
6 hours ago
by nick-hollon-lc
-0.01%
fix(langchain): redact PII on legacy `(BaseMessage, metadata)` events too
5fadeb5
5 hours ago
by nick-hollon-lc
+0.02%
fix(langchain): detect PII on the full accumulated buffer in `_PIIStreamTransformer`
a16aceb
5 hours ago
by nick-hollon-lc
-0.01%
fix(langchain): close `block` strategy bypass on `PIIMiddleware` stream
7f7dcbe
4 hours ago
by nick-hollon-lc
+0.04%
style(langchain): ruff format on `PIIMiddleware`
684561e
4 hours ago
by nick-hollon-lc
-0.03%
docs(langchain): document tool-call and tools-channel coverage on `PIIMiddleware`
de547e0
3 hours ago
by nick-hollon-lc
-0.01%
fix(langchain): walk `AIMessage.tool_calls` in `_redact_value`
e69177c
3 hours ago
by nick-hollon-lc
+0.04%
feat(langchain): apply lookback withholding to cumulative tool-call args
8b20e6f
3 hours ago
by nick-hollon-lc
© 2026 CodSpeed Technology
Home Terms Privacy Docs