From 46fcb8902bf1aefa92279e2d3307f66f2a9ba5e9 Mon Sep 17 00:00:00 2001 From: langfuse-bot Date: Thu, 27 Aug 2026 11:39:29 +0000 Subject: [PATCH] feat(api): update API spec from langfuse/langfuse 99e2ce9 --- langfuse/api/dataset_run_items/client.py | 17 +++++++++++++ langfuse/api/dataset_run_items/raw_client.py | 17 +++++++++++++ langfuse/api/datasets/client.py | 25 +++++++++++++++++++ langfuse/api/datasets/raw_client.py | 25 +++++++++++++++++++ langfuse/api/ingestion/client.py | 9 +++++++ langfuse/api/ingestion/raw_client.py | 9 +++++++ langfuse/api/legacy/metrics_v1/client.py | 9 +++++++ langfuse/api/legacy/metrics_v1/raw_client.py | 9 +++++++ langfuse/api/legacy/observations_v1/client.py | 17 +++++++++++++ .../api/legacy/observations_v1/raw_client.py | 17 +++++++++++++ langfuse/api/scores/client.py | 17 +++++++++++++ langfuse/api/scores/raw_client.py | 17 +++++++++++++ langfuse/api/sessions/client.py | 17 +++++++++++++ langfuse/api/sessions/raw_client.py | 17 +++++++++++++ langfuse/api/trace/client.py | 17 +++++++++++++ langfuse/api/trace/raw_client.py | 17 +++++++++++++ pyproject.toml | 1 + uv.lock | 4 ++- 18 files changed, 260 insertions(+), 1 deletion(-) diff --git a/langfuse/api/dataset_run_items/client.py b/langfuse/api/dataset_run_items/client.py index aee820da8..d9712be10 100644 --- a/langfuse/api/dataset_run_items/client.py +++ b/langfuse/api/dataset_run_items/client.py @@ -3,6 +3,7 @@ import datetime as dt import typing +import typing_extensions from ..commons.types.dataset_run_item import DatasetRunItem from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions @@ -28,6 +29,10 @@ def with_raw_response(self) -> RawDatasetRunItemsClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, create experiment data via the SDK experiment runner or the OpenTelemetry endpoint at POST /api/public/otel/v1/traces. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def create( self, *, @@ -107,6 +112,10 @@ def create( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset run items are replaced by experiment items; use `GET /api/public/experiment-items?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -180,6 +189,10 @@ def with_raw_response(self) -> AsyncRawDatasetRunItemsClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, create experiment data via the SDK experiment runner or the OpenTelemetry endpoint at POST /api/public/otel/v1/traces. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def create( self, *, @@ -267,6 +280,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset run items are replaced by experiment items; use `GET /api/public/experiment-items?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, diff --git a/langfuse/api/dataset_run_items/raw_client.py b/langfuse/api/dataset_run_items/raw_client.py index f281b13d2..374c1ebd2 100644 --- a/langfuse/api/dataset_run_items/raw_client.py +++ b/langfuse/api/dataset_run_items/raw_client.py @@ -2,6 +2,7 @@ import datetime as dt import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -25,6 +26,10 @@ class RawDatasetRunItemsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, create experiment data via the SDK experiment runner or the OpenTelemetry endpoint at POST /api/public/otel/v1/traces. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def create( self, *, @@ -168,6 +173,10 @@ def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset run items are replaced by experiment items; use `GET /api/public/experiment-items?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -293,6 +302,10 @@ class AsyncRawDatasetRunItemsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, create experiment data via the SDK experiment runner or the OpenTelemetry endpoint at POST /api/public/otel/v1/traces. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def create( self, *, @@ -436,6 +449,10 @@ async def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset run items are replaced by experiment items; use `GET /api/public/experiment-items?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, diff --git a/langfuse/api/datasets/client.py b/langfuse/api/datasets/client.py index 859ee0fe7..6a3b9b0c8 100644 --- a/langfuse/api/datasets/client.py +++ b/langfuse/api/datasets/client.py @@ -2,6 +2,7 @@ import typing +import typing_extensions from ..commons.types.dataset import Dataset from ..commons.types.dataset_run_with_items import DatasetRunWithItems from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -173,6 +174,10 @@ def create( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_run( self, dataset_name: str, @@ -218,6 +223,10 @@ def get_run( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def delete_run( self, dataset_name: str, @@ -263,6 +272,10 @@ def delete_run( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_runs( self, dataset_name: str, @@ -497,6 +510,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_run( self, dataset_name: str, @@ -550,6 +567,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def delete_run( self, dataset_name: str, @@ -603,6 +624,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_runs( self, dataset_name: str, diff --git a/langfuse/api/datasets/raw_client.py b/langfuse/api/datasets/raw_client.py index 306ad8f76..1b0f49b77 100644 --- a/langfuse/api/datasets/raw_client.py +++ b/langfuse/api/datasets/raw_client.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -368,6 +369,10 @@ def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_run( self, dataset_name: str, @@ -474,6 +479,10 @@ def get_run( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def delete_run( self, dataset_name: str, @@ -580,6 +589,10 @@ def delete_run( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_runs( self, dataset_name: str, @@ -1040,6 +1053,10 @@ async def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_run( self, dataset_name: str, @@ -1146,6 +1163,10 @@ async def get_run( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def delete_run( self, dataset_name: str, @@ -1252,6 +1273,10 @@ async def delete_run( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, dataset runs are replaced by experiments; use GET /api/public/experiments instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_runs( self, dataset_name: str, diff --git a/langfuse/api/ingestion/client.py b/langfuse/api/ingestion/client.py index af1da8396..c6ea6d805 100644 --- a/langfuse/api/ingestion/client.py +++ b/langfuse/api/ingestion/client.py @@ -2,6 +2,7 @@ import typing +import typing_extensions from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions from .raw_client import AsyncRawIngestionClient, RawIngestionClient @@ -27,6 +28,10 @@ def with_raw_response(self) -> RawIngestionClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def batch( self, *, @@ -128,6 +133,10 @@ def with_raw_response(self) -> AsyncRawIngestionClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def batch( self, *, diff --git a/langfuse/api/ingestion/raw_client.py b/langfuse/api/ingestion/raw_client.py index cb60a5fba..67d22c556 100644 --- a/langfuse/api/ingestion/raw_client.py +++ b/langfuse/api/ingestion/raw_client.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -25,6 +26,10 @@ class RawIngestionClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def batch( self, *, @@ -161,6 +166,10 @@ class AsyncRawIngestionClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def batch( self, *, diff --git a/langfuse/api/legacy/metrics_v1/client.py b/langfuse/api/legacy/metrics_v1/client.py index 22c593585..696afc985 100644 --- a/langfuse/api/legacy/metrics_v1/client.py +++ b/langfuse/api/legacy/metrics_v1/client.py @@ -2,6 +2,7 @@ import typing +import typing_extensions from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from .raw_client import AsyncRawMetricsV1Client, RawMetricsV1Client @@ -23,6 +24,10 @@ def with_raw_response(self) -> RawMetricsV1Client: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/metrics?query=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def metrics( self, *, query: str, request_options: typing.Optional[RequestOptions] = None ) -> MetricsResponse: @@ -122,6 +127,10 @@ def with_raw_response(self) -> AsyncRawMetricsV1Client: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/metrics?query=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def metrics( self, *, query: str, request_options: typing.Optional[RequestOptions] = None ) -> MetricsResponse: diff --git a/langfuse/api/legacy/metrics_v1/raw_client.py b/langfuse/api/legacy/metrics_v1/raw_client.py index a1a014380..3d396981e 100644 --- a/langfuse/api/legacy/metrics_v1/raw_client.py +++ b/langfuse/api/legacy/metrics_v1/raw_client.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing +import typing_extensions from json.decoder import JSONDecodeError from ...commons.errors.access_denied_error import AccessDeniedError @@ -20,6 +21,10 @@ class RawMetricsV1Client: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/metrics?query=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def metrics( self, *, query: str, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[MetricsResponse]: @@ -173,6 +178,10 @@ class AsyncRawMetricsV1Client: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/metrics?query=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def metrics( self, *, query: str, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[MetricsResponse]: diff --git a/langfuse/api/legacy/observations_v1/client.py b/langfuse/api/legacy/observations_v1/client.py index 631874321..871191ee5 100644 --- a/langfuse/api/legacy/observations_v1/client.py +++ b/langfuse/api/legacy/observations_v1/client.py @@ -3,6 +3,7 @@ import datetime as dt import typing +import typing_extensions from ...commons.types.observation_level import ObservationLevel from ...commons.types.observations_view_single import ObservationsViewSingle from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper @@ -26,6 +27,10 @@ def with_raw_response(self) -> RawObservationsV1Client: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, observation_id: str, @@ -68,6 +73,10 @@ def get( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_many( self, *, @@ -274,6 +283,10 @@ def with_raw_response(self) -> AsyncRawObservationsV1Client: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, observation_id: str, @@ -324,6 +337,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_many( self, *, diff --git a/langfuse/api/legacy/observations_v1/raw_client.py b/langfuse/api/legacy/observations_v1/raw_client.py index f68d62937..73343c130 100644 --- a/langfuse/api/legacy/observations_v1/raw_client.py +++ b/langfuse/api/legacy/observations_v1/raw_client.py @@ -2,6 +2,7 @@ import datetime as dt import typing +import typing_extensions from json.decoder import JSONDecodeError from ...commons.errors.access_denied_error import AccessDeniedError @@ -25,6 +26,10 @@ class RawObservationsV1Client: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, observation_id: str, @@ -129,6 +134,10 @@ def get( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_many( self, *, @@ -394,6 +403,10 @@ class AsyncRawObservationsV1Client: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, observation_id: str, @@ -498,6 +511,10 @@ async def get( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v2/observations?fromStartTime=&toStartTime=` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_many( self, *, diff --git a/langfuse/api/scores/client.py b/langfuse/api/scores/client.py index 155611244..d035dc0bd 100644 --- a/langfuse/api/scores/client.py +++ b/langfuse/api/scores/client.py @@ -3,6 +3,7 @@ import datetime as dt import typing +import typing_extensions from ..commons.types.create_score_value import CreateScoreValue from ..commons.types.score import Score from ..commons.types.score_data_type import ScoreDataType @@ -134,6 +135,10 @@ def create( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_many( self, *, @@ -275,6 +280,10 @@ def get_many( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` with the `id` filter instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> Score: @@ -439,6 +448,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_many( self, *, @@ -588,6 +601,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` with the `id` filter instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> Score: diff --git a/langfuse/api/scores/raw_client.py b/langfuse/api/scores/raw_client.py index c6b09bc11..b87521d7a 100644 --- a/langfuse/api/scores/raw_client.py +++ b/langfuse/api/scores/raw_client.py @@ -2,6 +2,7 @@ import datetime as dt import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -200,6 +201,10 @@ def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_many( self, *, @@ -411,6 +416,10 @@ def get_many( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` with the `id` filter instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[Score]: @@ -684,6 +693,10 @@ async def create( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_many( self, *, @@ -895,6 +908,10 @@ async def get_many( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Use `GET /api/public/v3/scores` with the `id` filter instead. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Score]: diff --git a/langfuse/api/sessions/client.py b/langfuse/api/sessions/client.py index 21c2e5b4f..d485c29ed 100644 --- a/langfuse/api/sessions/client.py +++ b/langfuse/api/sessions/client.py @@ -3,6 +3,7 @@ import datetime as dt import typing +import typing_extensions from ..commons.types.session_with_traces import SessionWithTraces from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions @@ -25,6 +26,10 @@ def with_raw_response(self) -> RawSessionsClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -91,6 +96,10 @@ def list( ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, session_id: str, @@ -152,6 +161,10 @@ def with_raw_response(self) -> AsyncRawSessionsClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, @@ -226,6 +239,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, session_id: str, diff --git a/langfuse/api/sessions/raw_client.py b/langfuse/api/sessions/raw_client.py index e68542051..9e27d41e4 100644 --- a/langfuse/api/sessions/raw_client.py +++ b/langfuse/api/sessions/raw_client.py @@ -2,6 +2,7 @@ import datetime as dt import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -24,6 +25,10 @@ class RawSessionsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -160,6 +165,10 @@ def list( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, session_id: str, @@ -274,6 +283,10 @@ class AsyncRawSessionsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, @@ -410,6 +423,10 @@ async def list( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read session data via `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, session_id: str, diff --git a/langfuse/api/trace/client.py b/langfuse/api/trace/client.py index dabb625be..2cf76a4a0 100644 --- a/langfuse/api/trace/client.py +++ b/langfuse/api/trace/client.py @@ -3,6 +3,7 @@ import datetime as dt import typing +import typing_extensions from ..commons.types.trace_with_full_details import TraceWithFullDetails from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.request_options import RequestOptions @@ -29,6 +30,10 @@ def with_raw_response(self) -> RawTraceClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, trace_id: str, @@ -112,6 +117,10 @@ def delete( _response = self._raw_client.delete(trace_id, request_options=request_options) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -379,6 +388,10 @@ def with_raw_response(self) -> AsyncRawTraceClient: """ return self._raw_client + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, trace_id: str, @@ -480,6 +493,10 @@ async def main() -> None: ) return _response.data + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, diff --git a/langfuse/api/trace/raw_client.py b/langfuse/api/trace/raw_client.py index 6ba91c604..7cb22a519 100644 --- a/langfuse/api/trace/raw_client.py +++ b/langfuse/api/trace/raw_client.py @@ -2,6 +2,7 @@ import datetime as dt import typing +import typing_extensions from json.decoder import JSONDecodeError from ..commons.errors.access_denied_error import AccessDeniedError @@ -28,6 +29,10 @@ class RawTraceClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def get( self, trace_id: str, @@ -240,6 +245,10 @@ def delete( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) def list( self, *, @@ -632,6 +641,10 @@ class AsyncRawTraceClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def get( self, trace_id: str, @@ -844,6 +857,10 @@ async def delete( body=_response_json, ) + @typing_extensions.deprecated( + "On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. In Langfuse v4, read span and trace data via `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.", + category=None, + ) async def list( self, *, diff --git a/pyproject.toml b/pyproject.toml index da80f399f..94762b977 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "opentelemetry-api>=1.33.1,<2", "opentelemetry-sdk>=1.33.1,<2", "opentelemetry-exporter-otlp-proto-http>=1.33.1,<2", + "typing-extensions>=4.12.2,<5", ] [dependency-groups] diff --git a/uv.lock b/uv.lock index 7687fb1b1..3bc5b4f2c 100644 --- a/uv.lock +++ b/uv.lock @@ -3,7 +3,7 @@ revision = 3 requires-python = ">=3.10, <4.0" [options] -exclude-newer = "2026-08-17T13:01:00.015107121Z" +exclude-newer = "2026-08-20T11:39:28.764709711Z" exclude-newer-span = "P7D" [[package]] @@ -564,6 +564,7 @@ dependencies = [ { name = "opentelemetry-sdk" }, { name = "packaging" }, { name = "pydantic" }, + { name = "typing-extensions" }, { name = "wrapt" }, ] @@ -598,6 +599,7 @@ requires-dist = [ { name = "opentelemetry-sdk", specifier = ">=1.33.1,<2" }, { name = "packaging", specifier = ">=23.2,<27.0" }, { name = "pydantic", specifier = ">=2,<3" }, + { name = "typing-extensions", specifier = ">=4.12.2,<5" }, { name = "wrapt", specifier = ">=1.14,<3" }, ]