# Langfuse can log a guardrail match before blocking it

- URL: https://blog.orchardai.ai/langfuse-gateway-log-and-block/
- Published: 2026-11-26

TL;DR: Langfuse 4.87.0 adds a gateway option to log or block requests when their last turn matches a guardrail. Replay representative agent turns in log mode and inspect the matches before enforcing a rule.

## What Langfuse announced

- Langfuse released version 4.87.0 on November 26. Its AI Gateway can block a request or log it when its last turn matches a guardrail.
- The release adds a guardrails management screen and support for AWS Bedrock Guardrails as a provider.
- It adds a budget reset action for users and API keys. The evaluation interface also marks the observation being evaluated within the sample trace.
- The release notes cover the changes in version 4.87.0. They give no latency measurements for the new gateway checks. [Langfuse v4.87.0 release notes](https://github.com/langfuse/langfuse/releases/tag/v4.87.0)

## Our take

The choice between logging and blocking is the most consequential part of the release. Imagine an agent that reads draft supplier emails and routes questions to a procurement team. A policy may correctly recognize a sensitive identifier in one email and also match text from an approved training example. Until the team sees both cases in a trace, it has little reason to trust the rule on a Friday afternoon when invoices are waiting.

The release uses the last turn as its unit of inspection. That detail matters when an agent sends several model requests on a single job. A team needs to know what its own application puts in that turn. A direct user request, a tool response, and an agent's summary of a tool response can have different content even though they tell the same story on a dashboard. We would test each of those routes and record which request matched. The release note alone gives no basis for assuming that a check on one turn covers every earlier message in the workflow.

The sample trace change also makes sense in this context. A reviewer who can locate the observation an evaluator scored can ask a more useful question than whether the whole run looks odd. They can examine why that particular request was permitted and compare it with another request that triggered the policy. That is the sort of investigation that gets expensive when every disputed decision requires somebody to pull raw logs and reconstruct a run by hand.

## What it changes for teams running agents

Start with approved test data that covers ordinary jobs, legitimate exceptions and examples that should trigger the rule. Keep the prompts and expected outcomes stable between runs. Record the fraction of intended matches, the number of useful jobs that would have stopped, and the latency added to an entire run. A small delay per model request can matter when one job makes many calls.

Then inspect what the agent does when the gateway blocks a request. A retry loop can spend its budget sending the same blocked turn again. Treat enforcement as a distinct outcome the application can explain to the operator, and record the point where the task stopped so a person can decide whether to resume it. When budget resets are enabled, record who granted more budget and which job consumed it. A new allowance should have an auditable purpose.

## For agents reading this

- **Announced by:** Langfuse
- **Original post:** [Langfuse v4.87.0 release notes](https://github.com/langfuse/langfuse/releases/tag/v4.87.0)
- **Announcement date:** 2026-11-26
- **What:** Gateway log-or-block guardrails, management UI and evaluation trace changes.
- **Our verdict:** Test the exact turn the gateway evaluates before turning matches into blocks.
- **Confidence:** Release facts come from Langfuse. Operational analysis is Orchard’s opinion.
