Skip to content

docs: add guardLatestUserMessage to TypeScript Bedrock guardrails#646

Merged
Unshure merged 3 commits intomainfrom
agent-tasks/643
Mar 19, 2026
Merged

docs: add guardLatestUserMessage to TypeScript Bedrock guardrails#646
Unshure merged 3 commits intomainfrom
agent-tasks/643

Conversation

@Unshure
Copy link
Copy Markdown
Member

@Unshure Unshure commented Mar 11, 2026

Summary

This PR adds documentation for the guardLatestUserMessage feature in the TypeScript SDK's BedrockModel guardrail configuration, achieving feature parity with the existing Python SDK documentation.

Changes

Files Modified

  1. src/content/docs/user-guide/concepts/model-providers/amazon-bedrock.ts

    • Added guardLatestUserMessage: true option to the guardrails code example
  2. src/content/docs/user-guide/concepts/model-providers/amazon-bedrock.mdx

    • Added explanatory note in the TypeScript tab explaining the feature's purpose and benefits

What This Feature Does

The guardLatestUserMessage option allows guardrails to evaluate only the most recent user message instead of the entire conversation history. This provides:

  • Performance optimization in multi-turn conversations
  • Cost reduction by evaluating fewer tokens per request
  • Avoiding redundant validation of previously validated messages

Verification

  • TypeScript compiles successfully
  • Site builds successfully (npm run build)
  • Feature parity between Python and TypeScript documentation sections

Resolves #643

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Request Changes

The documentation changes achieve feature parity between Python and TypeScript for the guardLatestUserMessage option and are well-written. However, the PR includes a build artifact that must be removed before merging.

Review Details
  • Critical: build_output.log (141KB build artifact) was accidentally committed and must be removed
  • Documentation: Changes to amazon-bedrock.mdx and amazon-bedrock.ts are correct and follow existing patterns

Please remove the build_output.log file and this PR will be ready to merge. 👍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-646/docs/user-guide/quickstart/overview/

Updated at: 2026-03-19T22:37:19.978Z

@Unshure Unshure marked this pull request as ready for review March 12, 2026 13:36
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Preview Failed

The documentation deployment encountered an error. Please check the deployment logs for more details.

@Unshure Unshure enabled auto-merge (squash) March 12, 2026 18:49
strands-agent and others added 3 commits March 19, 2026 18:32
Add documentation for the guardLatestUserMessage feature in the
TypeScript SDK's BedrockModel guardrail configuration:

- Add guardLatestUserMessage: true to TypeScript guardrails code example
- Add explanatory note explaining the feature's purpose and benefits
- Achieve feature parity with existing Python SDK documentation

This feature allows guardrails to evaluate only the most recent user
message instead of the entire conversation history, improving
performance and reducing costs in multi-turn conversations.

Resolves #643
@github-actions
Copy link
Copy Markdown
Contributor

Assessment: Approve ✅

PR is in good shape. The documentation changes achieve feature parity with Python SDK and follow existing patterns.

Verification
  • build_output.log removed
  • ✅ TypeScript snippet correctly adds guardLatestUserMessage: true
  • ✅ Note matches Python documentation format
  • ✅ Changes are minimal and focused

The CI preview deployment failure appears to be an infrastructure issue unrelated to the PR content.

Ready to merge! 🎉

@Unshure Unshure merged commit 6d52a08 into main Mar 19, 2026
10 checks passed
notowen333 pushed a commit to notowen333/docs that referenced this pull request Mar 27, 2026
…rands-agents#646)

Co-authored-by: Strands Agent <217235299+strands-agent@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW CONTENT] GuardLatestMessage Guardrail Docs

6 participants