UPDATElangfuse v4.89.0
Langfuse v4.89.0 ships guardrails to production traffic
AI Gateway guardrails drop the environment gate, so cloud production and self-hosted production can turn them on. Output guardrails buffer the full SSE stream and block matches that span chunks. The same release defaults the unified session and trace view on and lets code evaluators run on trace transcripts.
What changed in this release
32 checkpoints in 6 groups, organized by task from the official notes. Checkpoints do not count separate features or commits.
Guardrails and gateway policy
- Guardrails drop the environment gate; cloud production and self-hosted production can enable them
- Output guardrails cover JSON and SSE, buffering the whole stream before delivery
- OpenAI Moderation, Lakera Guard and decision models arrive as external guardrails
- Preset checks expand with a prompt injection template that logs by default
- An exceeded spend budget shows a banner on three gateway pages, with the next reset time
- Gateway members can no longer reset or override admin-set key budgets
- Key budgets can be removed from the default in bulk, with the locked state explained
Observability views
- Unified session and trace view is on by default in v4-beta environments
- The timeline gains a Compact layout that shares a row per nesting depth
- Packed rows now follow observation type with labels, and selection has one treatment
- Messages with text or images show their data parts inline in the formatted view
Evaluation
- Code evaluators can run on trace transcripts and trace samples
- A trace judge can be started from a transcript prompt
- The evaluator setup form adds a method header and labelled rows
Topics
- The cost card splits, projecting billable units per day or snapshot
- Each facet summarized on a trace counts as one billable unit
- Clustering takes at most a 10k random sample of summaries
- The neighbour graph builds once and clustering fits may run up to 300 seconds
- Only embedding models a connection can serve are listed, current Google models included
- Topics toolbars filter on topics.<Facet> and keep canonical facet ordering
API and data correctness
- v2 observations returns only the requested field groups
- Unknown-only field groups fall back to defaults
- A query with no rows returns an empty page with a cursor instead of a timeout
- Observation pages end before a window that cannot finish
- NUL in dataset item keys and identifiers is rejected
- The OpenAPI spec is named and lists cloud regions as servers
Ingestion, exports and operations
- Double subtraction of Genkit thoughts and AI SDK cache tokens stops
- A sample of OTEL batches is compared against the Rust path
- Media usage exports incrementally per project and UTC hour
- Scheduled exports disable when the plan no longer includes them
- Project update audit logs record the previous state
- ClickHouse migration 0050 waits for scores metadata
On this page
ContextBackground: guardrails stuck behind an environment gate, sessions split from traces
Teams running Langfuse in production watch two things: whether gateway calls carry customer data or keys, and how to replay a conversation without hopping pages. This version moves both.
Guardrails had been open only to local development, PR previews and staging; cloud production and self-hosted production stayed behind an environment gate.
Six groups changed: guardrails and gateway policy, views, evaluation, Topics, API correctness, and ingestion and exports. The figure below counts rows per group; details follow.
Guardrails lose the environment gate: production and self-hosted can switch them on
- Environment gate removed: guardrails reach cloud production and self-hosted production, not just local development and staging.
- Upgrade step: an admin creates rules under AI Gateway → Guardrails and picks scope; no environment variable to edit.
- Boundary: up to 20 guardrails per organization; a block returns 400 and the request never reaches the provider.
External guardrails add OpenAI Moderation, Lakera and decision models
- Two integrations: OpenAI Moderation screens harmful content, Lakera Guard applies your project policy; both offer Block and Log only.
- Decision models: up to 20 yes/no questions on an existing OpenAI or Vercel connection, each with a threshold, no extra key.
- Cost: enforcing external guardrails fail closed on errors, rate limits or timeouts (3 seconds by default), returning 429 or 503.
Output guardrails buffer the whole SSE stream and block before delivery
- Coverage: output guardrails run on successful JSON and SSE responses from the responses, chat/completions and messages endpoints.
- Buffering: one output guardrail makes the gateway collect the whole stream before replying, so cross-chunk matches are caught.
- Limits: output guardrails buffer at most 8 MiB of JSON and 32 MiB of SSE.
Sessions and traces share one screen, packed timeline rows follow observation type
- Default on: the unified view turns on in v4-beta when both the redesigned session view and the session timeline previews are on.
- Packed layout: a Compact switch gives one labelled row per observation type, such as Span, Agent or Tool.
- Cost: overlapping bars paint over each other, with no extra-lane colouring; only the selection style separates them.
Code evaluators now run on trace transcripts
- New target: code evaluators run on trace transcripts and on trace samples in the editor, reading messages as role and parts.
- Before this, only LLM-as-a-judge and decision-model evaluators saw a whole transcript.
- To score a conversation by rule, set the target to trace and read threads; no need to split messages into observations.
Topics quotes billable units up front and clusters on a sample
- Split card: one line projects Langfuse billable units per day or snapshot, the other keeps the provider model cost.
- Counting: each facet on a trace is one billable unit; the estimate is facets × traces a day at the sampling rate, plus one backfill.
- Clustering: at most a 10k random sample of summaries, with the neighbour graph built once.
Observations API v2 returns the field groups you asked for, empty pages carry a cursor
- Field groups: v2 observations returns only the groups you name, with no extras attached.
- Empty page: no rows returns a cursor instead of a timeout; unknown-only groups fall back to defaults.
- Write side: dataset item keys and identifiers containing NUL are rejected.
Side by side on guardrails: where Portkey, LiteLLM and Langfuse each stop
The verdict: all three block; what differs is where they check and what it costs. Langfuse alone collects the whole SSE stream before acting, so streamed output stops before delivery. LiteLLM splits policy by call stage across input and output; Portkey suits one check before the last message reaches the model.
Columns run Portkey v1.15.2, LiteLLM v1.111.1 and this product. Portkey reads only the last message, LiteLLM splits by call stage, Langfuse checks request and response separately. Read the streamed-output row first, then the action row.
| Update | Portkey AI Gateway v1.15.2 | LiteLLM v1.111.1 | Langfuse v4.89.0 |
|---|---|---|---|
| Side inspected | One side per guardrail: input or output | pre_call input, post_call input and output | Request guardrails on every model-call POST, output on 2xx JSON/SSE of three endpoints |
| Streamed output | After the stream ends, informational only | Default on, narrowable with stream_scope | Buffers full SSE, catches cross-chunk hits |
| Action on match | Seven types, incl. async and deny | BLOCK and MASK per entity | block, redact, log; block wins |
| Built-in checks | 20+ deterministic plus injection scan | From provider: aporia, lakera, presidio | PII, secrets, injection, 500 keywords |
| External providers | Aporia, SydeLabs, Pillar | aporia, bedrock, lakera, presidio | Bedrock, Moderation, Lakera, decision models |
Version to version: four behaviours that changed from v4.88.0 to v4.89.0
Four days separate the releases: v4.88.0 on 2026-11-26 and v4.89.0 on 2026-11-30. Guardrail actions and view layout carry the change, with one fix each in exports and ingestion.
Read it with v4.88.0 left and v4.89.0 right: take the action-level differences first, then view and export behaviour.
| Feature | v4.88.0 | v4.89.0 |
|---|---|---|
| Guardrail actions | Added redact; flagged counts link to traces | block, redact, log; block first; 20 per org |
| Views | Pinned session nav; empty pages showed onboarding | Unified view on by default; packed rows by type |
| Scheduled exports | Re-queued blob exports on shutdown | Disabled when the plan drops them |
| Ingest accounting | One fallback time per batch | No double subtraction of thoughts, cache tokens |
Release analysisTakeaway: enable guardrails first, move the views later, budgets land in the same release
Our own position, not independently tested: teams running the AI Gateway on self-hosted or cloud production must act, since guardrails were gated off there. Teams that only trace can wait; the view change alters pages, not data.
Portkey offers seven gateway action types, yet streamed output guardrails only report. LiteLLM splits call stages with pre_call, post_call and stream_scope. Langfuse stops traffic before delivery and holds the full stream, so long answers start later.
Our own position, not independently tested: start with Block on the input side for PII and keys; keep prompt injection on Log until matches have been read; raise decision-model thresholds one at a time, or internal debug prompts get blocked first.
Tell whoever is on call three things: whether scope is the last turn or the whole input, which code a provider timeout returns, and the output buffer size.
AIGenLab views
Not independently testedSelf-hosted teams should treat guardrails as the top reason to upgrade, since the capability only reaches production with this version.
Based on the gate removal recorded in PR #21043: cloud production and self-hosted production were blocked before it.
Keep the prompt injection guardrail on Log until you have read its matches, because it targets common phrases rather than novel attacks.
The documentation states the check defaults to Log so matches can be reviewed before tightening.
Teams that only trace without routing through the AI Gateway can wait for the next release; the default view change leaves stored data alone.
The observability items here change views and API responses, not the stored schema.
Questions
Do guardrails switch themselves on after upgrading to v4.89.0?
Does a guardrail slow every streamed request?
What does a blocked request return?
Can code evaluators score a whole conversation by rule now?
Official sources and scope
- Langfuse v4.89.0 release Version, release date and the changed items in this release
- Langfuse v4.88.0 release Previous-release behaviour for the version-to-version comparison
- Langfuse docs: AI Gateway guardrails Actions, scopes, external providers, buffer limits and fail-closed behaviour
- PR 21043: make guardrails generally available The environment gate removal and which environments were blocked
- PR 21159: enable unified session and trace view by default The conditions under which the unified view turns on by default
- PR 21098: pack timeline rows by observation type Packed timeline rows following observation type
- PR 20952: run code evaluators on trace transcripts The new transcript target for code evaluators and its message shape
- PR 20998: show projected billable units in map cost estimates How the Topics cost card counts billable units
- Langfuse changelog: AI Gateway guardrails The three guardrail actions and where clients configure them
- Langfuse changelog: OpenAI Moderation and Lakera Guard providers What the two external providers screen and which actions they offer
- Portkey AI Gateway guardrails documentation Cross-tool comparison: action types, inspected side and streamed output handling
- Portkey AI Gateway v1.15.2 release The version in the comparison column header
- LiteLLM proxy guardrails documentation Cross-tool comparison: call stages, streaming scope and actions
- LiteLLM v1.111.1 release The version in the comparison column header
Dates beside sources indicate when we consulted them, not when the vendor released the update. Procedures are editorial guidance, not independently tested.