unstale

pypi / langfuse

langfuse

What changed in langfuse 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

56 breaking1 security3 deprecations43 new APIs and options2 performance17 behavior and defaults1 tooling101 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

langfuse 567 changes

Breaking changes 33

  • The skills API moves to a stable namespace.

    5.1.0release notes

  • Previously deprecated public API methods are removed, including api.trace.get/list, api.sessions.*, api.legacy.*, api.ingestion.batch, and several dataset and score methods; use the documented replacements.

    5.0.1release notes

  • The SDK requires Python 3.11 or later; installing it on Python 3.10 installs the latest v4 instead.

    5.0.1release notes

  • fetch_trace_fields is renamed to fields, which defaults to core,basic,io,metadata.

    5.0.1release notes

  • The filter must now be a v2 filter JSON array.

    5.0.1release notes

  • The ingestion batch method is removed; use SDK tracing through OpenTelemetry for traces and api.scores.create for scores.

    5.0.0upgrade guide

  • The api.legacy namespace is removed; use the listed observations, metrics, and scores API replacements.

    5.0.0upgrade guide

  • This method is gone; create scores with api.scores.create(request=[...]) instead.

    5.0.0release notesupgrade guide

  • This method moves to api.scores.delete(score_id=...).

    5.0.0release notesupgrade guide

  • The scores_v3 namespace no longer exists; use api.scores.get_many with the same arguments and response.

    5.0.0release notesupgrade guide

  • Score creation now takes a list of CreateScoreRequest objects as request=; partial acceptance returns accepted and rejected counts and errors.

    5.0.0upgrade guide

  • This method now behaves like scores_v3.get_many_v3; filter by id= for comma-separated score IDs instead of score_ids=.

    5.0.0release notesupgrade guide

  • The sessions API methods are removed; retrieve observations with api.observations.get_many(session_id=...).

    5.0.0upgrade guide

  • Removed; retrieve trace observations with api.observations.get_many(trace_id=...).

    5.0.0upgrade guide

  • This Langfuse argument is removed; combine should_export_span with the default filter instead.

    5.0.0release notesupgrade guide

  • The GenAI check requires the gen_ai. prefix including its dot, so attributes such as gen_ai_custom no longer count.

    5.0.0release notesupgrade guide

  • The dataset run helper is removed; list experiment items and delete their traces with api.trace.delete_multiple instead.

    5.0.0release notesupgrade guide

  • The dataset run helper is removed; use the experiments API instead.

    5.0.0release notesupgrade guide

  • The dataset run helper is removed; use the experiments API instead.

    5.0.0release notesupgrade guide

  • The LangChain integration requires langchain-core 1 or later; importing it with an older version raises ModuleNotFoundError.

    5.0.0release notesupgrade guide

  • The SDK supports Langfuse Cloud or self-hosted Langfuse v4.59.0 or later; self-hosted v3 and older v4 releases are unsupported.

    5.0.0release notesupgrade guide

  • Now points to the Metrics v2 endpoint; use the legacy v1 namespace when querying a self-hosted Langfuse v3 server.

    4.0.0, 5.0.0upgrade guideupgrade guide

  • Now points to the Observations v2 endpoint; use the legacy v1 namespace when querying a self-hosted Langfuse v3 server.

    4.0.0, 5.0.0upgrade guideupgrade guide

  • The v2 score resource is now exposed as langfuse.api.scores; the v2 alias was removed.

    4.0.0, 5.0.0upgrade guideupgrade guide

  • Metadata attribute values, including strings, are JSON-encoded; exporters that read or write them should decode with json.loads and encode replacements with json.dumps.

    5.0.0release notesupgrade guide

  • The OpenAI integration requires openai 1.0 or later and no longer supports pre-1.0 SDKs.

    5.0.0release notesupgrade guide

  • V4 resume tokens cannot be reused, and resuming with a different filter raises ValueError.

    5.0.0release notesupgrade guide

  • _additional_trace_tags is removed.

    5.0.0release notesupgrade guide

  • Evaluation now reads v2 observations only; fetch_trace_fields becomes fields, filter must be a v2 JSON array, and the mapper receives an observation with raw-string input and output.

    5.0.0upgrade guide

  • Batched evaluation now reads from the v2 observations API and evaluates observations only; scope is removed.

    5.0.0release notesupgrade guide

  • The trace input/output setter is removed; set input and output on the root observation instead.

    5.0.0release notesupgrade guide

  • The trace input/output setter is removed; set input and output on the root observation instead.

    5.0.0release notesupgrade guide

  • Set trace input and output on the root observation using span.update(input=..., output=...).

    5.0.0upgrade guide

New APIs and options 9

  • Adds a helper for iterating observation pages in observations v2.

    5.2.0release notes

  • The API adds score metadata and provenance blob export field groups.

    5.1.0release notes

  • Skills gain discovery and availability tracing.

    5.1.0release notes

  • Accepts a caller-supplied experiment_id when running an experiment.

    5.0.3release notes

  • Set this environment variable to none if a proxy rejects gzip-compressed span batches.

    5.0.0release notesupgrade guide

  • Dataset versions are recorded on experiment items, including items from local-data runs.

    5.0.0release notesupgrade guide

  • Nested objects can be filtered by dotted path. Metadata values remain strings, so numeric and boolean comparisons are not supported yet.

    5.0.0upgrade guide

  • Experiment results now expose an experiment ID that links directly to the experiment comparison view.

    5.0.0release notesupgrade guide

  • Experiment results now expose a URL that links directly to the experiment comparison view.

    5.0.0release notesupgrade guide

Performance 1

  • Tracing skips span attribute limit checks when the span has room, reducing unnecessary checks.

    5.0.2release notes

Behavior and default changes 8

  • Pending scores are sent immediately when flush() is called.

    5.0.3release notes

  • Metadata attribute values, including strings, are JSON-encoded; exporters that read or write them should decode with json.loads and encode replacements with json.dumps.

    5.0.1release notes

  • Scores are sent in batches; partial HTTP 207 rejections and other 4xx responses are logged without retry, while network errors, 429, and 5xx responses are retried with backoff.

    5.0.1release notes

  • Pass a list of CreateScoreRequest objects as request; responses include accepted and rejected counts and errors when some scores are rejected.

    5.0.0release notesupgrade guide

  • The handler now imports only from langchain_core, so the langchain meta-package is no longer needed; its import path and usage are unchanged.

    5.0.0release notesupgrade guide

  • Correlating attributes propagate to every observation instead of living only on the trace, enabling single-table queries without expensive joins.

    4.0.0, 5.0.0upgrade guideupgrade guide

  • Experiments are recorded through OpenTelemetry; sampled-out items and their scores do not reach Langfuse when sample_rate is below 1, while run-level scores are always stored.

    5.0.0release notesupgrade guide

  • Metadata sent with v5 preserves numeric and boolean types, and nested objects can be filtered by dotted path.

    5.0.0release notesupgrade guide

Fixes and other changes 16

  • The API specification was updated from langfuse/langfuse; the notes do not specify which API details changed.

    5.2.0release notes

  • Observation page fetches use a 60 s timeout.

    5.2.0release notes

  • Batch evaluation keeps paging past empty observation pages.

    5.2.0release notes

  • OpenAI provider responses now preserve audio data.

    5.1.0release notes

  • Langfuse prompts are deregistered when a chain run errors.

    5.1.0release notes

  • Message names are retained in generation input.

    5.1.0release notes

  • Explicit parents are preserved for child events.

    5.1.0release notes

  • Root trace attributes are propagated to child runs under ainvoke.

    5.1.0release notes

  • No skills are returned when the skills directory cannot be read.

    5.1.0release notes

  • flush() no longer hangs after repeated shutdown() calls.

    5.0.4release notes

  • flush() works under gevent.

    5.0.4release notes

  • shutdown() works under gevent.

    5.0.4release notes

  • The streaming run memo is cleaned up on error.

    5.0.4release notes

  • The mapper receives an observation whose input and output are raw strings.

    5.0.1release notes

  • Set otel_compression to none if a proxy rejects gzip-compressed span batches.

    5.0.0release notesupgrade guide

  • Use the default sample_rate=1.0 client for complete experiments.

    5.0.0upgrade guide

langfuse 4105 changes

Breaking changes 19

  • The environment template now uses LANGFUSE_BASE_URL.

    4.8.1release notes

  • The LangChain handler's update_trace parameter no longer exists; passing it raises a TypeError.

    4.0.0upgrade guide

  • Use the Experiment SDK method to run dataset experiments; it handles propagation of experiment attributes and dataset item linking.

    4.0.0upgrade guide

  • The dataset item run() method was removed; use dataset.run_experiment() to run experiments and handle experiment attribute propagation.

    4.0.0upgrade guide

  • Set this environment variable to provide the release value; the release argument to update_current_trace() was removed.

    4.0.0upgrade guide

  • This type is no longer re-exported from langfuse.types; import it from langfuse.model instead.

    4.0.0upgrade guide

  • This TypedDict was removed from langfuse.types.

    4.0.0upgrade guide

  • The SDK no longer exports all OpenTelemetry spans by default; it exports Langfuse-created spans, spans with gen_ai.* attributes, and spans from known LLM instrumentation scopes.

    4.0.0upgrade guide

  • Use this context manager to apply correlating attributes to the current observation and all child observations created within its scope.

    4.0.0upgrade guide

  • Propagated metadata must be dict[str, str]; non-string values are coerced to strings, and values over 200 characters are dropped with a warning.

    4.0.0upgrade guide

  • The SDK now requires Pydantic v2; applications still using Pydantic v1 must use the pydantic.v1 compatibility shim.

    4.0.0upgrade guide

  • Use this method to set the current trace's public flag, replacing update_current_trace(public=True).

    4.0.0upgrade guide

  • Use this observation method to set the trace's public flag, replacing span.update_trace(public=True).

    4.0.0upgrade guide

  • Observation-level trace updates are decomposed into propagate_attributes(), set_trace_io(), and set_trace_as_public().

    4.0.0upgrade guide

  • This unified context-managed API replaces separate current-span and current-generation methods; use as_type to specify the observation type.

    4.0.0upgrade guide

  • Use startObservation and related functions from @langfuse/tracing in place of langfuse.trace(), langfuse.span(), and langfuse.generation().

    4.0.0upgrade guideupgrade guide

  • This TypedDict was removed from langfuse.types.

    4.0.0upgrade guide

  • Trace updates are decomposed: use propagate_attributes() for correlating attributes, set_current_trace_io() for legacy trace I/O, and set_current_trace_as_public() for the public flag.

    4.0.0upgrade guide

  • Values are validated as strings with a maximum length of 200 characters; longer values are dropped with a warning.

    4.0.0upgrade guide

Security 1

  • The serializer now masks Pydantic secret values.

    4.15.4release notes

Deprecations 3

  • This option still works but is deprecated; migrate its denylist behavior to a should_export_span callback.

    4.0.0upgrade guide

  • This method remains for backward compatibility with trace-level LLM-as-a-judge evaluators; new code should set input and output on the root observation.

    4.0.0upgrade guide

  • This observation method is deprecated; set input and output on the root observation directly for new code.

    4.0.0upgrade guide

New APIs and options 16

  • Adds opt-in gzip compression for the default OTLP exporter.

    4.17.0release notes

  • The OpenAI integration captures service_tier in model_parameters.

    4.14.0release notes

  • Supports prompt linking via propagate_attributes.

    4.14.0release notes

  • Tracing now allows custom OpenTelemetry ID generators.

    4.11.0release notes

  • Dataset items can now be multimodal.

    4.10.0release notes

  • Score data now supports the CORRECTION data type.

    4.9.0release notes

  • OTEL spans can be masked at the export stage.

    4.9.0release notes

  • Tracing adds media detection.

    4.9.0release notes

  • Adds RunnerContext for the experiment GitHub Action.

    4.6.1release notes

  • The client adds support for custom span exporters.

    4.2.0release notes

  • Import this helper from langfuse.span_filter to compose custom span filters with the default export behavior.

    4.0.0upgrade guide

  • Set the tracing environment via the LANGFUSE_TRACING_ENVIRONMENT environment variable.

    4.0.0upgrade guideupgrade guide

  • Use this namespace for legacy v1 metrics queries, including when a Python SDK v4 client temporarily queries a self-hosted Langfuse v3 server.

    4.0.0upgrade guide

  • Use this namespace for legacy v1 observation queries, including when a Python SDK v4 client temporarily queries a self-hosted Langfuse v3 server.

    4.0.0upgrade guide

  • Use this namespace for legacy v1 score queries.

    4.0.0upgrade guide

  • Set this Langfuse client option to control which spans are exported, including preserving export-all behavior or composing a custom filter with the default.

    4.0.0upgrade guide

Performance 1

  • Span processing skips span_formatter when debug logging is off, avoiding unnecessary formatting work.

    4.15.1release notes

Behavior and default changes 7

  • Default exporter batches are capped at 64 MiB.

    4.16.0release notes

  • Tool definitions are normalized to OpenAI function format.

    4.14.2release notes

  • Tracing now propagates environment attributes.

    4.12.0release notes

  • Span processing now marks app root spans, making them identifiable in trace data.

    4.7.0release notes

  • Span processing recognizes expanded LLM scopes.

    4.7.0release notes

  • LangChain root observations are now marked in metadata.

    4.0.6release notes

  • Values are validated as strings with a maximum length of 200 characters; longer values are dropped with a warning.

    4.0.0upgrade guide

Tooling 1

  • Adds RegressionError for the experiment GitHub Action.

    4.6.1release notes

Fixes and other changes 57

  • Dataset JSON-schema response fields are typed as objects.

    4.18.0release notes

  • Read-side metadata is typed as optional objects.

    4.18.0release notes

  • Langfuse now captures reasoning_effort in model parameters.

    4.15.6release notes

  • Langfuse now captures verbosity in model parameters.

    4.15.6release notes

  • NaN/Inf values nested in converted containers are now sanitized during serialization.

    4.15.5release notes

  • The API specification was updated from upstream Langfuse changes.

    4.15.1release notesrelease notes

  • The API specification was updated; the notes do not specify which API details changed.

    4.14.6release notes

  • Fixed a memory leak in OTEL traces.

    4.14.6release notes

  • The API specification was updated from two Langfuse revisions; the notes do not describe the specific changes.

    4.14.5release notes

  • Serialization now handles NaN and Inf floats nested in Pydantic models.

    4.14.5release notes

  • Media data URIs now support URL-safe Base64.

    4.14.4release notes

  • OpenAI Omit sentinels are treated like NotGiven when logging.

    4.14.4release notes

  • Masking batches now keep the last duplicate span.

    4.14.3release notes

  • The legacy score create alias is preserved for compatibility.

    4.14.2release notes

  • Run metadata precedence is preserved.

    4.14.2release notes

  • A zero sample rate is preserved.

    4.14.2release notes

  • Span ending is deferred when cancellation occurs and the generator is never resumed.

    4.14.2release notes

  • LiteLLM raw spans are excluded from application roots.

    4.14.1release notes

  • Task and evaluator latency are separated in experiments.

    4.14.1release notes

  • LangChain integration handles a nested dict for Anthropic cache_creation in usage.

    4.14.0release notes

  • Handles null choices in chat completion responses.

    4.13.2release notes

  • Raw API responses are now parsed, and a flag was added to skip tracing them.

    4.13.1release notes

  • Model names are now extracted for ChatHuggingFace.

    4.13.0release notes

  • Consumer threads are reinitialized after os.fork().

    4.13.0release notes

  • Structured tool inputs are no longer duplicated in metadata.

    4.11.0release notes

  • The API spec was updated from the Langfuse repository.

    4.10.0release notes

  • Handled LangChain tool errors are now marked as errors.

    4.10.0release notes

  • LangChain now prefers structured tool inputs.

    4.10.0release notes

  • Preserves Responses tools and streamed tool calls in the OpenAI integration.

    4.9.1release notes

  • The API spec was updated from langfuse/langfuse; the notes do not specify the individual API changes.

    4.9.0release notes

  • Correctly serializes float('-inf') as "-Infinity".

    4.8.1release notes

  • Preserves the current observation type when a span is updated.

    4.8.1release notes

  • Handles prompt_tokens_details when it is a dict in _parse_usage_model.

    4.8.1release notes

  • Coerces propagated metadata values.

    4.8.1release notes

  • Supports wrapt 2.x.

    4.8.1release notes

  • A depth limit prevents EventSerializer from hanging on complex objects.

    4.7.0release notes

  • Handles Azure stream chunks that lack delta fields.

    4.6.1release notes

  • Propagated metadata is now flattened in experiments.

    4.5.1release notes

  • LangGraph control flow traces are preserved.

    4.5.0release notes

  • The native v1 stream contract is preserved for OpenAI.

    4.5.0release notes

  • Streaming context is preserved when output capture is disabled.

    4.5.0release notes

  • The API specification was updated; the notes do not specify which API details changed.

    4.3.1release notes

  • The LangChain integration now propagates trace name metadata.

    4.3.1release notes

  • The API spec was updated from langfuse/langfuse; the notes do not specify which API details changed.

    4.1.0release notesrelease notes

  • Fixed unstable local experiment IDs for local data.

    4.0.5release notes

  • The LangChain propagation context now exits gracefully.

    4.0.3release notes

  • Handles asyncio.CancelledError in exception blocks.

    4.0.2release notes

  • Maintains propagated context in async experiments.

    4.0.2release notes

  • Corrects token details field names for Response API usage.

    4.0.2release notes

  • Includes responses instructions in the captured prompt.

    4.0.2release notes

  • Correctly parses the session ID for scores.

    4.0.2release notes

  • Stricter early routing for base64 media prevents SSE data truncation.

    4.0.0release notes

  • CallbackHandler now handles invalid tool calls.

    4.0.0release notes

  • Escaped newlines are replaced with actual newlines in format output.

    4.0.0release notes

  • Priority-tier keys are skipped when subtracting token detail counts.

    4.0.0release notes

  • Media requests reuse the httpx client.

    3.14.6, 4.0.0release notesrelease notes

  • Failed media uploads are retried.

    4.0.0release notes

langfuse 352 changes

Breaking changes 4

  • Running experiments requires Langfuse v3.151.0 as of this release.

    3.14.1release notes

  • The client moved to LANGFUSE_BASE_URL for configuring the base URL.

    3.8.1release notes

  • Support for Python 3.9 was dropped because it reached end of life.

    3.8.0release notes

  • On Langfuse Cloud, this endpoint stops accepting everything except scores on November 16, 2026; custom integrations need to migrate.

    3.0.0upgrade guide

New APIs and options 18

  • Langfuse v3 supports text scores.

    3.15.0release notes

  • The LangChain root metadata flag is backported to v3-stable.

    3.14.6release notes

  • Batch evaluation rolls scores up to the trace.

    3.14.5release notes

  • Batch evaluation adds trace tags, allowing developers to tag traces during evaluation.

    3.14.5release notes

  • Supports running versioned experiments.

    3.14.1release notes

  • Batch evaluation accepts a fields parameter for more efficient trace fetching.

    3.13.0release notes

  • Adds a metadata parameter to score_current_span.

    3.12.1release notes

  • Adds a metadata parameter to score_current_trace.

    3.12.1release notes

  • The Langfuse client gains methods to fetch and delete dataset runs.

    3.12.0release notes

  • Span client score methods accept a score metadata argument.

    3.12.0release notes

  • Trace names can now be propagated through the client.

    3.11.0release notes

  • Score creation accepts an optional timestamp parameter.

    3.10.5release notes

  • Added a comment field to Langfuse Evaluation using autoevals metadata.

    3.10.3release notes

  • LangchainCallbackHandler now allows injecting trace_context.

    3.10.3release notes

  • Adds schema arguments to create_dataset.

    3.10.2release notes

  • Adds run_batched_evaluation for running batched evaluations.

    3.10.0release notes

  • Support for LangChain v1 was added.

    3.8.0release notes

  • A new OTEL-based Langfuse Python SDK is available.

    3.0.0release notes

Behavior and default changes 2

  • Trace attributes are propagated onto all child spans when updated.

    3.9.0release notes

  • Langfuse observe now handles starlette.StreamingResponse.

    3.7.0release notes

Fixes and other changes 28

  • Experiment run item requests omit the dataset version when it is None.

    3.14.4release notes

  • Parses finish_reason from chat completion streams.

    3.14.3release notes

  • The API specification was updated, which may affect the API definitions available to developers.

    3.14.2release notes

  • Usage details are now parsed from response API response chunks.

    3.14.2release notes

  • The API specification was updated; the notes do not specify which API details changed.

    3.14.0release notes

  • Passes the trace ID when creating a score with scope set to observations.

    3.12.1release notes

  • Trace URL generation is skipped when tracing is disabled.

    3.12.1release notes

  • Evaluations are moved to the root experiment span.

    3.12.0release notes

  • get_client reuses the httpx client.

    3.11.2release notes

  • Prompt linking now works with LangChain v1 create_agent.

    3.11.1release notes

  • The client now flushes on shutdown.

    3.10.7release notes

  • A provided custom tracer provider is now flushed.

    3.10.6release notes

  • OpenAI handling now supports non-integer parsed_n values.

    3.10.6release notes

  • Defines tracer_provider when tracing_enabled=False.

    3.10.5release notes

  • Corrected Gemini input token calculation when an implicit cache is hit using LangChain.

    3.10.3release notes

  • Reinitialization now reuses a passed tracer provider.

    3.10.3release notes

  • Metadata can be supplied as a Pydantic BaseModel.

    3.10.2release notes

  • The prompt cache is evicted when a NotFound error occurs.

    3.10.2release notes

  • Dataset names are now URL-encoded, so names containing URL-sensitive characters can be handled correctly.

    3.10.1release notes

  • The API spec was updated, which may affect the API surface available to developers.

    3.9.3release notes

  • Evaluations are moved out of the root span.

    3.9.2release notesrelease notes

  • Handles update_current_trace gracefully on non-recorded spans.

    3.9.2release notes

  • The API spec was updated from the langfuse/langfuse repository; the notes do not specify which API details changed.

    3.9.1release notes

  • The API spec was updated from the langfuse/langfuse repository; the notes do not specify which API details changed.

    3.9.1release notes

  • Avoids an empty status message when the observe decorator captures an exception.

    3.9.0release notes

  • The API spec was updated in three changes, which may affect the client API available to developers.

    3.8.1release notes

  • HTTP headers are concatenated by dashes instead of snakecase.

    3.8.0release notes

  • The API specification was updated, which may affect developers relying on the Langfuse API.

    3.7.0release notes