Langfuse v4: up to 165× faster · Read more
← Back to changelog
October 12, 2026

Python SDK v5 and JS/TS SDK v6

Picture Hassieb PakzadHassieb Pakzad

New SDK majors built for Langfuse v4, with experiments recorded through OpenTelemetry, compressed span export, and a client trimmed to the current Public API.

Python SDK v5 and JS/TS SDK v6 are built for Langfuse v4. They send spans with the v4 ingestion header for real-time processing, compress span batches with gzip, and record experiments entirely through OpenTelemetry. The generated API clients only include the current Public API, so autocomplete no longer suggests endpoints that Langfuse v4 deprecated.

  • Re-run an experiment with the same name on the same dataset and the results land in the same experiment, with a direct experimentUrl / experiment_url to the comparison view.
  • Filter on typed metadata: both SDKs JSON-encode every metadata value, so numbers and booleans keep their type and nested objects become filterable dotted paths such as a.b.
  • Send large traces with less bandwidth, since span batches are gzip-compressed by default.

Upgrade

Both majors require Langfuse Cloud or self-hosted Langfuse v4.55.0 or later. If you self-host Langfuse v3, stay on Python SDK v4 and JS/TS SDK v5.

Python SDK v5 requires Python 3.11+ and langchain-core>=1 for the LangChain integration. JS/TS SDK v6 requires Node.js 22+ and @langchain/core@^1 for the LangChain integration.

pip install --upgrade "langfuse>=5"
npm install @langfuse/client@6 @langfuse/tracing@6 @langfuse/otel@6

The migration guides list every breaking change with before/after code, including removed Public API methods, the experiments API replacing dataset run helpers, JSON-encoded metadata values, and trace input/output set on the root observation.


Was this page helpful?