Skip to content

v6.0: docs: make middleware examples compile and safely handle streaming guardrails - #21211

Merged
gr2m merged 1 commit into
release-v6.0from
documentation-fix-21209-20260920215204705418
Sep 22, 2026
Merged

gr2m merged 1 commit into
release-v6.0from
documentation-fix-21209-20260920215204705418

Conversation

@ai-sdk-factory

Copy link
Copy Markdown
Contributor

Background

The release-v6.0 middleware examples omitted the required V3 specification field, and the guardrails example did not safely handle matches split across stream deltas.

Summary

Added specificationVersion: 'v3' to all five middleware examples and implemented per-text-block buffered streaming redaction with guidance about latency, memory use, split matches, and unbounded patterns.

Testing

pnpm check and pnpm type-check:full passed. A direct file-targeted formatter invocation was unsupported, but the repository-wide formatting and lint check passed.

Related Issues

Fixes #21209

Co-authored-by: roshcompanylabs <[email protected]>
@gr2m
gr2m merged commit 87b77af into release-v6.0 Sep 22, 2026
57 checks passed
@gr2m
gr2m deleted the documentation-fix-21209-20260920215204705418 branch September 22, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants