Upgrading Langfuse SDKs: Python v5 and JS/TS v6

Python SDK v5 and JS/TS SDK v6 need Langfuse v4.59.0 or later on the server. This page explains how to sequence the server and SDK changes, keep older services tracing, and plan code evaluator requirements.

On this page

Why a Langfuse SDK upgrade depends on the server version

If your self-hosted Langfuse runs on a server older than v4.59.0, the new Python SDK v5 and JS/TS SDK v6 will not work against it, so the server upgrade sets the order of everything else. Plan the Langfuse server first, confirm it reports v4.59.0 or later, and only then move services to the new SDKs. The SDK upgrade is a separate change from the server upgrade. It touches application code, dependency files and deployment pipelines in each service that sends traces, and it can be scheduled independently once the server is ready.

Start with an inventory. List every service that sends traces, prompts or evaluation data to your instance, the SDK package and version each one uses today, and the runtime it runs on. Teams with several services on older SDKs usually find a mix of versions, and the mix matters: each service can move on its own schedule as long as the server supports both the old and new clients during the transition. Confirm the exact server version in your deployment, since the Langfuse v3 to v4 upgrade guide sets the baseline that the new SDKs require, and check the Langfuse GitHub releases page for the current release before you set a target.

Ask your server team whether the upgrade to v4.59.0 or later is already done or still in the plan. If the server is still on v3, the v3 to v4 migration, with its ClickHouse, PostgreSQL and Redis minimums and its data model change, becomes the critical path, and SDK work should wait for it. If the server is already on v4.59.0 or later, the SDK work can start immediately, one service at a time, with a rollback path for each.

What changes in the SDKs and what each change requires

This table lists the version requirements that tie the new Python and JS/TS SDKs to a Langfuse server and to the OpenTelemetry-based SDKs that code evaluators need. Read each row as a gate: confirm the server version first, then the SDK version in each service, and treat anything not listed as untested until your own environment has verified it. The main takeaway is that the server upgrade has to come before the SDK switch.

ChangeImpactAction needed
Python SDK v5 requires Langfuse v4.59.0 or laterServices on Python SDK v5 will not work correctly against an older Langfuse serverUpgrade the server to v4.59.0 or later before deploying SDK v5 to any service
JS/TS SDK v6 requires Langfuse v4.59.0 or laterServices on JS/TS SDK v6 need the same server minimum as Python v5Upgrade the server to v4.59.0 or later before deploying SDK v6 to any service
Code evaluators need OpenTelemetry-based SDK tracesObservations sent by older, non-OpenTelemetry SDKs cannot be scored by code evaluatorsConfirm Python SDK v3 or later, or JS/TS SDK v4 or later, on every service that feeds evaluated traces
Python SDK v3 or later for code evaluator inputPython services below v3 produce observations that code evaluators will not processInventory Python services and record the installed SDK version of each one
JS/TS SDK v4 or later for code evaluator inputJS/TS services below v4 produce observations that code evaluators will not processInventory Node.js and browser services and record the installed SDK version of each one
Breaking-change details in each SDK releaseMethod names, parameters and defaults may change between majors and are not summarized hereRead the Python and JS/TS SDK changelogs and list every change that touches your code
Compatibility of old SDKs with the new serverOlder SDK versions are not to be assumed compatible with the upgraded server without testingRun each SDK version you keep in service against a staging server running the target version
Mixed SDK versions during rolloutServices on different SDK majors may send different data shapes during the switchPlan a rollout order and confirm traces from each service appear correctly before moving the next

Why the server must reach v4.59.0 before new SDKs ship

The server version gates the SDK, so Langfuse must run v4.59.0 or later before you install Python SDK v5 or JS/TS SDK v6. Langfuse states that these SDK majors need that server release, and an SDK upgrade on an older server is not a supported path. Treat the server upgrade as the first change in the sequence and the SDK rollout as the second. Confirm the exact minimum in the Langfuse v3 to v4 upgrade guide before you pin versions, because the guide is the document that sets the requirement.

The path to v4.59.0 depends on where you are today. If you run a v3 deployment, the v3 to v4 guide covers the infrastructure minimums, including ClickHouse 25.12 or later, PostgreSQL 15 or later and Redis 7.0 or later, and the data model change. If you use the Langfuse Helm chart with bundled data stores, the chart must move from v1 to v2 before the application upgrades to v4, so that step belongs early in the plan. Check which chart version and which bundled or external data stores your installation uses before you schedule anything, because that answer determines how many steps sit in front of the SDK work.

Whether to upgrade the server now is a separate decision with its own risks, including the observations-first ClickHouse model and the disk headroom needed for backfilling history. Make that decision on the dedicated v4 migration page, then return here to plan the SDK rollout. Until the server runs v4.59.0 or later, keep existing SDK versions in production, and confirm with your platform owner that every service that sends traces can stay on its current SDK during the server cutover.

What to inventory before changing any SDK version

Every SDK change depends on the server version, the services that send traces, and the evaluators that read those traces. Build a complete inventory before you touch a dependency, so each service has a known starting point, a known target and a way back.

Services and languages that call Langfuse

List every service, job and notebook that sends traces, scores or prompt requests to Langfuse, with its language and runtime. Include batch jobs, cron tasks and third-party agents that your teams did not write directly. Note which services use the Python SDK, which use the JS/TS SDK, and which send OpenTelemetry spans through the /api/public/otel endpoint. Each row becomes one upgrade item with its own owner and test.

OpenTelemetry docs

SDK versions in each service

For each service, record the exact Langfuse SDK version in use, including transitive dependencies pulled in by frameworks. Lock files often show a different version than the one written in the manifest, so read the resolved file rather than the top-level requirement. Confirm whether any service still uses an SDK generation older than the OpenTelemetry-based releases. Those services need a different path before they can take the newer code evaluator support.

Evaluator definitions and their ingestion

List every code evaluator and the observations it reads. Code evaluators need observations ingested with an OpenTelemetry-based SDK, which means Python SDK v3 or later or JS/TS SDK v4 or later. Mark any evaluator whose input comes from an older SDK, because its scores may stop updating after the server change. Record who owns each evaluator definition so that the rollout does not leave one behind.

Minimum SDK generations
v3 / v4
Code evaluators docs

A non-production Langfuse at v4.59.0 or later

Confirm that a non-production Langfuse instance runs v4.59.0 or later before any SDK goes live. Python SDK v5 and JS/TS SDK v6 need that server version or newer. Use a copy of production configuration, including the same ClickHouse and PostgreSQL versions, so that the test reflects real ingestion. Ask your team to confirm the server version that each environment reports, not the version recorded in the deployment plan.

Backups of the server databases

Take and verify backups of PostgreSQL, ClickHouse and blob storage before the server version changes. Those three stores hold trace history, prompts and evaluator configuration, and a restore is the only reliable way back if a server migration fails. Test a restore into the non-production instance, not just a backup job that reports success. Record the backup time and the server version it was taken from.

v3 to v4 upgrade guide

Pinned dependencies and rollback per service

For each service, pin the SDK version in its lock file and record the previous pinned version as the rollback target. Note the deployment method, such as a container image tag or a package registry version, and confirm the previous artifact is still available. A rollback plan should name who approves it and which test confirms that traces are arriving again. Without a pinned previous version, a failed rollout can only be fixed by a new build.

How server and SDK versions move in phases

The rollout starts with an inventory of every service that sends traces to Langfuse, including code evaluators. The server moves first to Langfuse v4.59.0 or later on a non-production instance, because Python SDK v5 and JS/TS SDK v6 require it. One service then gets its SDK upgraded and tested, and you verify that traces and evaluator results still arrive. Only after that check do the remaining services move, and old SDK pins are retired last. A decision point asks whether code evaluators depend on the service, since those need an OpenTelemetry-based SDK, so check the evaluator path before anything else moves.

Phased order for moving the Langfuse server and SDKs together.

How to sequence the SDK rollout across services

The sequence moves the server, one low-risk service and then the remaining services onto the new SDKs in waves, with a verified checkpoint and a rollback point at each stage so that old and new SDK traffic can coexist until the migration is complete.

  1. Confirm the server version first

    Before any application code changes, confirm that your self-hosted Langfuse is at v4.59.0 or later, the minimum that Python SDK v5 and JS/TS SDK v6 require. Check the running version in your deployment and compare it with the release notes on the Langfuse GitHub releases page. If the server is older, complete the server upgrade in its own change window first, since the SDK upgrade cannot be validated against an unsupported server. Done means the running version is recorded in your change ticket and every environment (staging and production) reports the same version. Rollback point: nothing has changed in application code, so the server can stay where it is.

  2. Verify evaluator prerequisites on each service

    Inventory every service that sends traces and every code evaluator that scores their observations. Code evaluators need observations ingested through an OpenTelemetry-based SDK: Python SDK v3 or later, or JS/TS SDK v4 or later. Services on older SDKs that feed code evaluators must be upgraded to at least that line before evaluator results can be trusted. Done means you have a written list of services, their current SDK versions and which evaluators depend on each one. Rollback point: this step is read-only, so no rollback is needed.

  3. Upgrade one low-risk service

    Choose a service with modest traffic, few downstream dependencies and an owner who can watch its traces closely. Pin the new SDK version in its dependency file, build a staging image, and deploy it to staging, then to production in the same change window. Keep the previous image and dependency lock available so the service can be redeployed on the old SDK in minutes. Done means the service deploys and handles requests on the new SDK without errors in its own logs. Rollback point: redeploy the previous image with the old SDK pin.

  4. Verify trace ingestion and evaluator results

    Confirm that the pilot service produces traces with the expected structure in Langfuse: traces, observations, nested spans, model names, token usage, inputs and outputs. Then confirm that code evaluators run against its new observations and write scores as before. Compare a sample of scores with the same workflow on the old SDK if you have one. Done means a named owner has signed off on trace shape and evaluator output in writing. Rollback point: if traces or scores are wrong, roll back the service and keep it on the previous SDK while you investigate.

  5. Keep old SDK pins for unmigrated services

    Leave every service you have not yet migrated on its current SDK version, with its dependency lock and image unchanged. Do not remove old SDK packages from shared base images or build templates until the wave that uses them is complete, because a shared change can move services you did not intend to touch. Mixed SDK versions can write to the same Langfuse project during the transition, so check that each team knows which services are on which version. Done means a documented inventory maps each service to its SDK version and owner. Rollback point: each unmigrated service is already on a known-good version.

  6. Roll out in waves by service group

    Group the remaining services by risk, traffic and shared ownership, then migrate one wave at a time. For each wave, repeat the pilot checks: deploy to staging, deploy to production, confirm ingestion and evaluator output, and record the result. Pause between waves to watch for regressions in scores, dashboards or alerts that depend on trace data. Done means each wave has a recorded verification result and the inventory shows its new version. Rollback point: a wave can be reverted service by service, because earlier waves remain on the new SDK and later waves remain on the old one.

  7. Confirm no service remains on old pins

    Once all waves are complete, scan the repositories, base images and build templates for old SDK pins, including transitive dependencies and scripts or notebooks that send traces. Ask each owner to confirm that their service has been validated on the new SDK. Done means the inventory shows the new SDK version for every sending service, and no old packages appear in lock files. Rollback point: until old pins are removed, reverting a single service remains possible.

  8. Remove old pins after a stable period

    After the migrated services have run stably for a period your team agrees on in advance, remove the old SDK pins and retired images from build templates and lock files. Ask the Langfuse team or your support contact to confirm any remaining compatibility notes for the SDK versions you are retiring. Done means old pins are gone from all repositories, the inventory is closed, and the change record links the verification evidence from each wave. Rollback point: retain the last old-version artifacts in your registry until the stable period ends, so that a late regression can still be reverted.

Keeping older SDKs working during the switch

Many applications will still run older Python or JS/TS SDKs when the Langfuse server moves to v4. Those services keep sending traces, so the first question is whether the server version in use accepts their ingestion calls without changes. Treat the new SDK major versions as a separate rollout, not a side effect of the server upgrade. Confirm the exact pairing you run by testing it, because mixed-version behavior depends on the Langfuse version you deploy.

  • Pin the current SDK versions: Record the exact Python and JS/TS SDK versions each service uses before the server change, so you can roll back a single service without guessing.
  • Run a trace smoke test per service: Send a test trace from each older SDK to a staging server on the target version and confirm it appears in the UI and API.
  • Watch ingestion errors during cutover: Check server and application logs for rejected or dropped events from old clients during the first hours after the switch.
  • Avoid mixing upgrades in one release: Do not upgrade the server, the SDKs and application code in the same change window, so a failure has one cause.
  • Keep the old SDK deployable: Keep a tagged build of each service that uses the older SDK until traces from production are confirmed.

Before cutover, confirm the mixed-version pairing for every service in staging, then confirm it again in production after the first day of traffic.

Questions teams ask before upgrading Langfuse SDKs

What does an SDK upgrade cost, and what drives the effort?

The cost is mostly the internal or partner time spent changing application code, testing traces and rolling out services, plus any server work the new SDKs require. The SDK packages themselves are open source, so the license cost is zero, but a self-hosted server must be on a version the new SDKs support. Effort rises with the number of services and repositories that call Langfuse, how many custom integrations wrap the SDK, how much you rely on code evaluators, and how much test coverage exists for trace output. Ask any partner for a quote built from a written inventory of services, SDK versions and evaluators, with the server upgrade costed separately if it is needed.

How long does an SDK upgrade take?

Duration depends on what has to happen first and how many services must move. The largest factor is whether the Langfuse server is already on v4.59.0 or later, since the Python SDK v5 and JS/TS SDK v6 need that version. If the server is older, the server upgrade becomes the critical path. Other drivers are the number of applications, release processes that require change approval, and whether services can be updated in one window or must be staged. Ask for a timeline that lists these dependencies explicitly rather than a single number.

Can our internal team do the SDK upgrade alone?

Often yes, if your engineers already run the applications that send traces and can test the output in a non-production environment. The work is mostly code changes, configuration review and verification, not infrastructure design. Teams usually need help when they must coordinate the server version first, manage many services at once, or prove the change to a compliance or security review. Confirm internally who owns each service, who can approve a server version change, and who will check trace completeness before you decide.

What does the work need from our team?

You need access to the repositories and deployment pipelines for every service that uses Langfuse, a staging environment connected to a Langfuse server, and named owners who can sign off on behavior. Engineers should be able to compare traces before and after the change. Someone must also own the server version, because the SDK upgrade depends on it. Prepare a list of services, current SDK versions, custom wrappers and code evaluators so the work can be scoped in writing before it starts.

Can old SDKs keep working during the switch?

Old SDKs can usually keep sending data during a staged rollout, which lets you move services one at a time instead of all at once. Confirm this for each SDK version and server version in your plan, because compatibility depends on the release notes for the versions you run. Keep the old and new SDK versions running side by side only for as long as needed, and check that traces from both appear as expected in the Langfuse UI before retiring the old path.

How are code evaluators affected by the upgrade?

Code evaluators only work on observations ingested with an OpenTelemetry-based SDK: the Python SDK v3 or later, or the JS/TS SDK v4 or later. If any service still sends data through an older SDK, its observations cannot be scored by code evaluators, even when the server is current. Inventory which evaluators run and which services feed them, then verify after the upgrade that new observations appear with the expected fields. Review evaluator logic too, since a change in how data is shaped can affect scores.

Do we need to change the Langfuse server to upgrade SDKs?

Yes, if your server runs a version earlier than v4.59.0, because the Python SDK v5 and JS/TS SDK v6 need that version or later. Plan the server upgrade first or alongside the SDK work. The server upgrade itself can be a major change with infrastructure and data model effects, so review the v3 to v4 upgrade guide before deciding the order.

What makes an SDK upgrade take longer

This table lists the factors that stretch or shorten a Python v5 or JS/TS v6 SDK upgrade, and the direction each one pushes the effort. Read it before estimating your own work, then check each row against your service inventory. The main takeaway is that the number of codebases and the state of your server upgrade usually matter more than the SDK change itself.

Effort driverWhy it changes the workHow to keep it down
Number of services and languagesEach service that calls the SDK needs its own dependency change, test run and deployment, so effort grows with every codebase added.Inventory every service that imports the Python or JS/TS SDK, and group them by language and release path before scheduling.
Custom wrappers around SDK callsInternal helpers that hide SDK calls spread the change across shared code, and wrapper APIs may need signature changes too.Confirm which wrappers call the SDK directly and keep the wrapper interface stable while the internals move.
Code evaluators and OpenTelemetry setupCode evaluators need observations from an OpenTelemetry-based SDK, so services on older tracing setups need instrumentation work first.Confirm each service's SDK generation against the code evaluator requirements before you change any evaluator.
Server upgrade still pendingThe new SDKs need Langfuse v4.59.0 or later, so a server still on an older release blocks the SDK change until it is upgraded.Sequence the server upgrade first and confirm the running version on every environment before the SDK rollout starts.
Test coverage of trace outputTrace names, attributes, scores and nesting must still look right after the change, and weak tests leave this to manual checking in each environment.Add tests that compare emitted traces in staging against a recorded baseline for key workflows.
Approval cycles for production changesChange boards, security reviews and release freezes add waiting time that does not shrink with engineering speed.Ask your change process owner for lead times up front and bundle service changes into fewer approvals where policy allows.
Old SDK versions during the switchServices that must keep running on older SDKs while others move need compatibility checks across both versions writing to the same project.Agree a rollout order and a cutover date per service, and confirm that old and new SDK traces appear correctly side by side.

How DeployOpen scopes and delivers a Langfuse SDK upgrade

DeployOpen treats an SDK upgrade as a coordinated change across the Langfuse server and every service that sends traces, not as a code change in one repository. We start by confirming the server version, then move services in an order that keeps tracing and code evaluators working throughout.

How we scope

  • The written scope lists which Python and JS/TS services send traces and which evaluators depend on them.
  • We record the current Langfuse server version and confirm it is v4.59.0 or later before SDK work starts.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins.

How we build

  • We inventory SDK versions per service and flag any still on pre-OpenTelemetry SDKs that code evaluators cannot read.
  • We test each upgraded service in a non-production environment against your self-hosted Langfuse instance first.
  • We plan the rollout order so old and new SDK versions can coexist while services are moved one at a time.

How we hand over

  • You receive a service-by-service record of SDK versions, server version and rollout status.
  • We document rollback steps for each service, including how to pin the previous SDK version if traces stop arriving.
  • We walk your engineers through trace and evaluator checks so they can repeat them after the engagement ends.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer for future SDK and server releases.
  • We can retest evaluator behavior after each Langfuse server upgrade in your environment.
  • Ask us to confirm the support scope in writing as part of the quote, including who handles incidents.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.