AIGenLab
EN

UPDATElangfuse v4.89.0

Langfuse v4.89.0 ships guardrails to production traffic

Version & typev4.89.0 · Feature
In short

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

Read the original announcement

On this page
  1. Release inventory
  2. Background
  3. Guardrails lose the envir…
  4. External guardrails add O…
  5. Output guardrails buffer…
  6. Sessions and traces share…
  7. Code evaluators now run o…
  8. Topics quotes billable un…
  9. Observations API v2 retur…
  10. Side by side on guardrails
  11. Version to version
  12. Release analysis
  13. Questions
  14. Sources & method

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.

Update rows per group: guardrails and gateway policy leads with 7, Topics, API correctness and ingestion have 6 each, views 4 and evaluation 3.
Where the 32 grouped changes landWhere the 32 grouped changes landGuardrails and gateway policy7Observability views4Evaluation3Topics6API and data correctness6Ingestion, exports and operations6
AIGenLab original

Guardrails lose the environment gate: production and self-hosted can switch them on

  1. Environment gate removed: guardrails reach cloud production and self-hosted production, not just local development and staging.
  2. Upgrade step: an admin creates rules under AI Gateway → Guardrails and picks scope; no environment variable to edit.
  3. 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

  1. Two integrations: OpenAI Moderation screens harmful content, Lakera Guard applies your project policy; both offer Block and Log only.
  2. Decision models: up to 20 yes/no questions on an existing OpenAI or Vercel connection, each with a threshold, no extra key.
  3. 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

  1. Coverage: output guardrails run on successful JSON and SSE responses from the responses, chat/completions and messages endpoints.
  2. Buffering: one output guardrail makes the gateway collect the whole stream before replying, so cross-chunk matches are caught.
  3. 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

  1. Default on: the unified view turns on in v4-beta when both the redesigned session view and the session timeline previews are on.
  2. Packed layout: a Compact switch gives one labelled row per observation type, such as Span, Agent or Tool.
  3. 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

  1. New target: code evaluators run on trace transcripts and on trace samples in the editor, reading messages as role and parts.
  2. Before this, only LLM-as-a-judge and decision-model evaluators saw a whole transcript.
  3. 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

  1. Split card: one line projects Langfuse billable units per day or snapshot, the other keeps the provider model cost.
  2. Counting: each facet on a trace is one billable unit; the estimate is facets × traces a day at the sampling rate, plus one backfill.
  3. 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

  1. Field groups: v2 observations returns only the groups you name, with no extras attached.
  2. Empty page: no rows returns a cursor instead of a timeout; unknown-only groups fall back to defaults.
  3. 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.

UpdatePortkey AI Gateway v1.15.2LiteLLM v1.111.1Langfuse v4.89.0
Side inspectedOne side per guardrail: input or outputpre_call input, post_call input and outputRequest guardrails on every model-call POST, output on 2xx JSON/SSE of three endpoints
Streamed outputAfter the stream ends, informational onlyDefault on, narrowable with stream_scopeBuffers full SSE, catches cross-chunk hits
Action on matchSeven types, incl. async and denyBLOCK and MASK per entityblock, redact, log; block wins
Built-in checks20+ deterministic plus injection scanFrom provider: aporia, lakera, presidioPII, secrets, injection, 500 keywords
External providersAporia, SydeLabs, Pillaraporia, bedrock, lakera, presidioBedrock, 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.

Featurev4.88.0v4.89.0
Guardrail actionsAdded redact; flagged counts link to tracesblock, redact, log; block first; 20 per org
ViewsPinned session nav; empty pages showed onboardingUnified view on by default; packed rows by type
Scheduled exportsRe-queued blob exports on shutdownDisabled when the plan drops them
Ingest accountingOne fallback time per batchNo 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 tested

Self-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?
No. The release only removes the environment gate; an admin still creates rules under AI Gateway → Guardrails and picks their scope and action.
Does a guardrail slow every streamed request?
Only requests with an output guardrail buffer the whole stream; requests without one still stream as before and are untouched by this change.
What does a blocked request return?
A 400 with the guardrail_blocked code; the blocked request never reaches the model provider.
Can code evaluators score a whole conversation by rule now?
Yes. Set the target to trace to read threads, where messages keep role and parts, the same structure LLM-as-a-judge evaluators read.

Official sources and scope

Dates beside sources indicate when we consulted them, not when the vendor released the update. Procedures are editorial guidance, not independently tested.