From 75b91562002f9f595fa72984eefc8d87c8e12cae Mon Sep 17 00:00:00 2001 From: langfuse-bot Date: Tue, 23 Jun 2026 08:19:39 +0000 Subject: [PATCH 1/2] feat(api): update API spec from langfuse/langfuse 8cdf8a4 --- langfuse/api/__init__.py | 9 ++++ langfuse/api/commons/__init__.py | 9 ++++ langfuse/api/commons/types/__init__.py | 9 ++++ langfuse/api/commons/types/dataset_item.py | 7 +++ .../types/dataset_item_media_reference.py | 40 ++++++++++++++++ .../dataset_item_media_reference_field.py | 26 ++++++++++ .../dataset_item_media_reference_media.py | 47 +++++++++++++++++++ langfuse/api/media/client.py | 46 ++++++++++++------ langfuse/api/media/raw_client.py | 40 ++++++++++++---- .../types/get_media_upload_url_request.py | 28 +++++++++-- langfuse/api/sessions/client.py | 28 +++++++++-- langfuse/api/sessions/raw_client.py | 28 +++++++++-- 12 files changed, 280 insertions(+), 37 deletions(-) create mode 100644 langfuse/api/commons/types/dataset_item_media_reference.py create mode 100644 langfuse/api/commons/types/dataset_item_media_reference_field.py create mode 100644 langfuse/api/commons/types/dataset_item_media_reference_media.py diff --git a/langfuse/api/__init__.py b/langfuse/api/__init__.py index 46985c0b9..256f1230b 100644 --- a/langfuse/api/__init__.py +++ b/langfuse/api/__init__.py @@ -86,6 +86,9 @@ CreateScoreValue, Dataset, DatasetItem, + DatasetItemMediaReference, + DatasetItemMediaReferenceField, + DatasetItemMediaReferenceMedia, DatasetRun, DatasetRunItem, DatasetRunWithItems, @@ -396,6 +399,9 @@ "CreateTextPromptType": ".prompts", "Dataset": ".commons", "DatasetItem": ".commons", + "DatasetItemMediaReference": ".commons", + "DatasetItemMediaReferenceField": ".commons", + "DatasetItemMediaReferenceMedia": ".commons", "DatasetRun": ".commons", "DatasetRunItem": ".commons", "DatasetRunWithItems": ".commons", @@ -717,6 +723,9 @@ def __dir__(): "CreateTextPromptType", "Dataset", "DatasetItem", + "DatasetItemMediaReference", + "DatasetItemMediaReferenceField", + "DatasetItemMediaReferenceMedia", "DatasetRun", "DatasetRunItem", "DatasetRunWithItems", diff --git a/langfuse/api/commons/__init__.py b/langfuse/api/commons/__init__.py index 81cb57f96..a35064081 100644 --- a/langfuse/api/commons/__init__.py +++ b/langfuse/api/commons/__init__.py @@ -20,6 +20,9 @@ CreateScoreValue, Dataset, DatasetItem, + DatasetItemMediaReference, + DatasetItemMediaReferenceField, + DatasetItemMediaReferenceMedia, DatasetRun, DatasetRunItem, DatasetRunWithItems, @@ -84,6 +87,9 @@ "CreateScoreValue": ".types", "Dataset": ".types", "DatasetItem": ".types", + "DatasetItemMediaReference": ".types", + "DatasetItemMediaReferenceField": ".types", + "DatasetItemMediaReferenceMedia": ".types", "DatasetRun": ".types", "DatasetRunItem": ".types", "DatasetRunWithItems": ".types", @@ -174,6 +180,9 @@ def __dir__(): "CreateScoreValue", "Dataset", "DatasetItem", + "DatasetItemMediaReference", + "DatasetItemMediaReferenceField", + "DatasetItemMediaReferenceMedia", "DatasetRun", "DatasetRunItem", "DatasetRunWithItems", diff --git a/langfuse/api/commons/types/__init__.py b/langfuse/api/commons/types/__init__.py index 5ce0a58cd..12faf307f 100644 --- a/langfuse/api/commons/types/__init__.py +++ b/langfuse/api/commons/types/__init__.py @@ -19,6 +19,9 @@ from .create_score_value import CreateScoreValue from .dataset import Dataset from .dataset_item import DatasetItem + from .dataset_item_media_reference import DatasetItemMediaReference + from .dataset_item_media_reference_field import DatasetItemMediaReferenceField + from .dataset_item_media_reference_media import DatasetItemMediaReferenceMedia from .dataset_run import DatasetRun from .dataset_run_item import DatasetRunItem from .dataset_run_with_items import DatasetRunWithItems @@ -78,6 +81,9 @@ "CreateScoreValue": ".create_score_value", "Dataset": ".dataset", "DatasetItem": ".dataset_item", + "DatasetItemMediaReference": ".dataset_item_media_reference", + "DatasetItemMediaReferenceField": ".dataset_item_media_reference_field", + "DatasetItemMediaReferenceMedia": ".dataset_item_media_reference_media", "DatasetRun": ".dataset_run", "DatasetRunItem": ".dataset_run_item", "DatasetRunWithItems": ".dataset_run_with_items", @@ -163,6 +169,9 @@ def __dir__(): "CreateScoreValue", "Dataset", "DatasetItem", + "DatasetItemMediaReference", + "DatasetItemMediaReferenceField", + "DatasetItemMediaReferenceMedia", "DatasetRun", "DatasetRunItem", "DatasetRunWithItems", diff --git a/langfuse/api/commons/types/dataset_item.py b/langfuse/api/commons/types/dataset_item.py index 54a13d81a..cb1cc4cb0 100644 --- a/langfuse/api/commons/types/dataset_item.py +++ b/langfuse/api/commons/types/dataset_item.py @@ -7,6 +7,7 @@ import typing_extensions from ...core.pydantic_utilities import UniversalBaseModel from ...core.serialization import FieldMetadata +from .dataset_item_media_reference import DatasetItemMediaReference from .dataset_status import DatasetStatus @@ -52,6 +53,12 @@ class DatasetItem(UniversalBaseModel): updated_at: typing_extensions.Annotated[ dt.datetime, FieldMetadata(alias="updatedAt") ] + media_references: typing_extensions.Annotated[ + typing.List[DatasetItemMediaReference], FieldMetadata(alias="mediaReferences") + ] = pydantic.Field() + """ + Resolved Langfuse media references found in input, expectedOutput, and metadata. + """ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( extra="allow", frozen=True diff --git a/langfuse/api/commons/types/dataset_item_media_reference.py b/langfuse/api/commons/types/dataset_item_media_reference.py new file mode 100644 index 000000000..056a21c37 --- /dev/null +++ b/langfuse/api/commons/types/dataset_item_media_reference.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import UniversalBaseModel +from ...core.serialization import FieldMetadata +from .dataset_item_media_reference_field import DatasetItemMediaReferenceField +from .dataset_item_media_reference_media import DatasetItemMediaReferenceMedia + + +class DatasetItemMediaReference(UniversalBaseModel): + field: DatasetItemMediaReferenceField = pydantic.Field() + """ + The dataset item field containing the reference + """ + + reference_string: typing_extensions.Annotated[ + str, FieldMetadata(alias="referenceString") + ] = pydantic.Field() + """ + The Langfuse media reference string, e.g. `@@@langfuseMedia:type=image/png|id=...|source=bytes@@@` + """ + + json_path: typing_extensions.Annotated[str, FieldMetadata(alias="jsonPath")] = ( + pydantic.Field() + ) + """ + JSONPath of the string holding the reference within the field, e.g. `$['image']` + """ + + media: DatasetItemMediaReferenceMedia = pydantic.Field() + """ + The resolved media record. + """ + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) diff --git a/langfuse/api/commons/types/dataset_item_media_reference_field.py b/langfuse/api/commons/types/dataset_item_media_reference_field.py new file mode 100644 index 000000000..9dc9df5cd --- /dev/null +++ b/langfuse/api/commons/types/dataset_item_media_reference_field.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ...core import enum + +T_Result = typing.TypeVar("T_Result") + + +class DatasetItemMediaReferenceField(enum.StrEnum): + INPUT = "input" + EXPECTED_OUTPUT = "expectedOutput" + METADATA = "metadata" + + def visit( + self, + input: typing.Callable[[], T_Result], + expected_output: typing.Callable[[], T_Result], + metadata: typing.Callable[[], T_Result], + ) -> T_Result: + if self is DatasetItemMediaReferenceField.INPUT: + return input() + if self is DatasetItemMediaReferenceField.EXPECTED_OUTPUT: + return expected_output() + if self is DatasetItemMediaReferenceField.METADATA: + return metadata() diff --git a/langfuse/api/commons/types/dataset_item_media_reference_media.py b/langfuse/api/commons/types/dataset_item_media_reference_media.py new file mode 100644 index 000000000..94ca39f38 --- /dev/null +++ b/langfuse/api/commons/types/dataset_item_media_reference_media.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ...core.pydantic_utilities import UniversalBaseModel +from ...core.serialization import FieldMetadata + + +class DatasetItemMediaReferenceMedia(UniversalBaseModel): + media_id: typing_extensions.Annotated[str, FieldMetadata(alias="mediaId")] = ( + pydantic.Field() + ) + """ + The unique langfuse identifier of the media record + """ + + content_type: typing_extensions.Annotated[ + str, FieldMetadata(alias="contentType") + ] = pydantic.Field() + """ + The MIME type of the media record + """ + + content_length: typing_extensions.Annotated[ + int, FieldMetadata(alias="contentLength") + ] = pydantic.Field() + """ + The size of the media record in bytes + """ + + url: str = pydantic.Field() + """ + The signed download URL of the media record + """ + + url_expiry: typing_extensions.Annotated[str, FieldMetadata(alias="urlExpiry")] = ( + pydantic.Field() + ) + """ + The expiry date and time of the download URL + """ + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( + extra="allow", frozen=True + ) diff --git a/langfuse/api/media/client.py b/langfuse/api/media/client.py index b22272b92..a539384ed 100644 --- a/langfuse/api/media/client.py +++ b/langfuse/api/media/client.py @@ -138,12 +138,14 @@ def patch( def get_upload_url( self, *, - trace_id: str, content_type: MediaContentType, content_length: int, sha256hash: str, field: str, + trace_id: typing.Optional[str] = OMIT, observation_id: typing.Optional[str] = OMIT, + dataset_id: typing.Optional[str] = OMIT, + dataset_item_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetMediaUploadUrlResponse: """ @@ -151,9 +153,6 @@ def get_upload_url( Parameters ---------- - trace_id : str - The trace ID associated with the media record - content_type : MediaContentType content_length : int @@ -163,11 +162,20 @@ def get_upload_url( The SHA-256 hash of the media record field : str - The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata` + The item field the media is in: `input`/`output`/`metadata` (trace) or `input`/`expectedOutput`/`metadata` (dataset item). + + trace_id : typing.Optional[str] + The trace the media is associated with. Null for dataset item media uploads. observation_id : typing.Optional[str] The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null. + dataset_id : typing.Optional[str] + The dataset the media belongs to. Null for trace/observation media uploads. + + dataset_item_id : typing.Optional[str] + The dataset item the media is associated with (need not exist yet). Null for trace/observation media uploads. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -189,7 +197,6 @@ def get_upload_url( base_url="https://yourhost.com/path/to/api", ) client.media.get_upload_url( - trace_id="traceId", content_type=MediaContentType.IMAGE_PNG, content_length=1, sha256hash="sha256Hash", @@ -197,12 +204,14 @@ def get_upload_url( ) """ _response = self._raw_client.get_upload_url( - trace_id=trace_id, content_type=content_type, content_length=content_length, sha256hash=sha256hash, field=field, + trace_id=trace_id, observation_id=observation_id, + dataset_id=dataset_id, + dataset_item_id=dataset_item_id, request_options=request_options, ) return _response.data @@ -349,12 +358,14 @@ async def main() -> None: async def get_upload_url( self, *, - trace_id: str, content_type: MediaContentType, content_length: int, sha256hash: str, field: str, + trace_id: typing.Optional[str] = OMIT, observation_id: typing.Optional[str] = OMIT, + dataset_id: typing.Optional[str] = OMIT, + dataset_item_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> GetMediaUploadUrlResponse: """ @@ -362,9 +373,6 @@ async def get_upload_url( Parameters ---------- - trace_id : str - The trace ID associated with the media record - content_type : MediaContentType content_length : int @@ -374,11 +382,20 @@ async def get_upload_url( The SHA-256 hash of the media record field : str - The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata` + The item field the media is in: `input`/`output`/`metadata` (trace) or `input`/`expectedOutput`/`metadata` (dataset item). + + trace_id : typing.Optional[str] + The trace the media is associated with. Null for dataset item media uploads. observation_id : typing.Optional[str] The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null. + dataset_id : typing.Optional[str] + The dataset the media belongs to. Null for trace/observation media uploads. + + dataset_item_id : typing.Optional[str] + The dataset item the media is associated with (need not exist yet). Null for trace/observation media uploads. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -405,7 +422,6 @@ async def get_upload_url( async def main() -> None: await client.media.get_upload_url( - trace_id="traceId", content_type=MediaContentType.IMAGE_PNG, content_length=1, sha256hash="sha256Hash", @@ -416,12 +432,14 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.get_upload_url( - trace_id=trace_id, content_type=content_type, content_length=content_length, sha256hash=sha256hash, field=field, + trace_id=trace_id, observation_id=observation_id, + dataset_id=dataset_id, + dataset_item_id=dataset_item_id, request_options=request_options, ) return _response.data diff --git a/langfuse/api/media/raw_client.py b/langfuse/api/media/raw_client.py index 4cc619770..af82e197d 100644 --- a/langfuse/api/media/raw_client.py +++ b/langfuse/api/media/raw_client.py @@ -251,12 +251,14 @@ def patch( def get_upload_url( self, *, - trace_id: str, content_type: MediaContentType, content_length: int, sha256hash: str, field: str, + trace_id: typing.Optional[str] = OMIT, observation_id: typing.Optional[str] = OMIT, + dataset_id: typing.Optional[str] = OMIT, + dataset_item_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetMediaUploadUrlResponse]: """ @@ -264,9 +266,6 @@ def get_upload_url( Parameters ---------- - trace_id : str - The trace ID associated with the media record - content_type : MediaContentType content_length : int @@ -276,11 +275,20 @@ def get_upload_url( The SHA-256 hash of the media record field : str - The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata` + The item field the media is in: `input`/`output`/`metadata` (trace) or `input`/`expectedOutput`/`metadata` (dataset item). + + trace_id : typing.Optional[str] + The trace the media is associated with. Null for dataset item media uploads. observation_id : typing.Optional[str] The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null. + dataset_id : typing.Optional[str] + The dataset the media belongs to. Null for trace/observation media uploads. + + dataset_item_id : typing.Optional[str] + The dataset item the media is associated with (need not exist yet). Null for trace/observation media uploads. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -294,6 +302,8 @@ def get_upload_url( json={ "traceId": trace_id, "observationId": observation_id, + "datasetId": dataset_id, + "datasetItemId": dataset_item_id, "contentType": content_type, "contentLength": content_length, "sha256Hash": sha256hash, @@ -609,12 +619,14 @@ async def patch( async def get_upload_url( self, *, - trace_id: str, content_type: MediaContentType, content_length: int, sha256hash: str, field: str, + trace_id: typing.Optional[str] = OMIT, observation_id: typing.Optional[str] = OMIT, + dataset_id: typing.Optional[str] = OMIT, + dataset_item_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetMediaUploadUrlResponse]: """ @@ -622,9 +634,6 @@ async def get_upload_url( Parameters ---------- - trace_id : str - The trace ID associated with the media record - content_type : MediaContentType content_length : int @@ -634,11 +643,20 @@ async def get_upload_url( The SHA-256 hash of the media record field : str - The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata` + The item field the media is in: `input`/`output`/`metadata` (trace) or `input`/`expectedOutput`/`metadata` (dataset item). + + trace_id : typing.Optional[str] + The trace the media is associated with. Null for dataset item media uploads. observation_id : typing.Optional[str] The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null. + dataset_id : typing.Optional[str] + The dataset the media belongs to. Null for trace/observation media uploads. + + dataset_item_id : typing.Optional[str] + The dataset item the media is associated with (need not exist yet). Null for trace/observation media uploads. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -652,6 +670,8 @@ async def get_upload_url( json={ "traceId": trace_id, "observationId": observation_id, + "datasetId": dataset_id, + "datasetItemId": dataset_item_id, "contentType": content_type, "contentLength": content_length, "sha256Hash": sha256hash, diff --git a/langfuse/api/media/types/get_media_upload_url_request.py b/langfuse/api/media/types/get_media_upload_url_request.py index 99f055847..a530578b4 100644 --- a/langfuse/api/media/types/get_media_upload_url_request.py +++ b/langfuse/api/media/types/get_media_upload_url_request.py @@ -10,11 +10,15 @@ class GetMediaUploadUrlRequest(UniversalBaseModel): - trace_id: typing_extensions.Annotated[str, FieldMetadata(alias="traceId")] = ( - pydantic.Field() - ) """ - The trace ID associated with the media record + Request a presigned media upload URL. Provide exactly one context: a trace (traceId, optionally observationId) or a dataset item (datasetId + datasetItemId). field is required and must match the chosen context. + """ + + trace_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="traceId") + ] = pydantic.Field(default=None) + """ + The trace the media is associated with. Null for dataset item media uploads. """ observation_id: typing_extensions.Annotated[ @@ -24,6 +28,20 @@ class GetMediaUploadUrlRequest(UniversalBaseModel): The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null. """ + dataset_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="datasetId") + ] = pydantic.Field(default=None) + """ + The dataset the media belongs to. Null for trace/observation media uploads. + """ + + dataset_item_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="datasetItemId") + ] = pydantic.Field(default=None) + """ + The dataset item the media is associated with (need not exist yet). Null for trace/observation media uploads. + """ + content_type: typing_extensions.Annotated[ MediaContentType, FieldMetadata(alias="contentType") ] @@ -43,7 +61,7 @@ class GetMediaUploadUrlRequest(UniversalBaseModel): field: str = pydantic.Field() """ - The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata` + The item field the media is in: `input`/`output`/`metadata` (trace) or `input`/`expectedOutput`/`metadata` (dataset item). """ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/sessions/client.py b/langfuse/api/sessions/client.py index b99829feb..21c2e5b4f 100644 --- a/langfuse/api/sessions/client.py +++ b/langfuse/api/sessions/client.py @@ -36,7 +36,12 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedSessions: """ - Get sessions + Get sessions. + + This legacy endpoint is not recommended for new data extraction workflows. + Use the v2 observations endpoint with a bounded time range and group rows by + `sessionId` instead: + `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Parameters ---------- @@ -93,7 +98,12 @@ def get( request_options: typing.Optional[RequestOptions] = None, ) -> SessionWithTraces: """ - Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=` + Get a session. + + Please note that `traces` on this endpoint are not paginated. For large + sessions or new data extraction workflows, use the v2 observations endpoint + with a URL-encoded `sessionId` filter and a bounded time range: + `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Parameters ---------- @@ -153,7 +163,12 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> PaginatedSessions: """ - Get sessions + Get sessions. + + This legacy endpoint is not recommended for new data extraction workflows. + Use the v2 observations endpoint with a bounded time range and group rows by + `sessionId` instead: + `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Parameters ---------- @@ -218,7 +233,12 @@ async def get( request_options: typing.Optional[RequestOptions] = None, ) -> SessionWithTraces: """ - Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=` + Get a session. + + Please note that `traces` on this endpoint are not paginated. For large + sessions or new data extraction workflows, use the v2 observations endpoint + with a URL-encoded `sessionId` filter and a bounded time range: + `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Parameters ---------- diff --git a/langfuse/api/sessions/raw_client.py b/langfuse/api/sessions/raw_client.py index 9c39a9a5a..e68542051 100644 --- a/langfuse/api/sessions/raw_client.py +++ b/langfuse/api/sessions/raw_client.py @@ -35,7 +35,12 @@ def list( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[PaginatedSessions]: """ - Get sessions + Get sessions. + + This legacy endpoint is not recommended for new data extraction workflows. + Use the v2 observations endpoint with a bounded time range and group rows by + `sessionId` instead: + `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Parameters ---------- @@ -162,7 +167,12 @@ def get( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SessionWithTraces]: """ - Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=` + Get a session. + + Please note that `traces` on this endpoint are not paginated. For large + sessions or new data extraction workflows, use the v2 observations endpoint + with a URL-encoded `sessionId` filter and a bounded time range: + `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Parameters ---------- @@ -275,7 +285,12 @@ async def list( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[PaginatedSessions]: """ - Get sessions + Get sessions. + + This legacy endpoint is not recommended for new data extraction workflows. + Use the v2 observations endpoint with a bounded time range and group rows by + `sessionId` instead: + `GET /api/public/v2/observations?fromStartTime=&toStartTime=`. Parameters ---------- @@ -402,7 +417,12 @@ async def get( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SessionWithTraces]: """ - Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=` + Get a session. + + Please note that `traces` on this endpoint are not paginated. For large + sessions or new data extraction workflows, use the v2 observations endpoint + with a URL-encoded `sessionId` filter and a bounded time range: + `GET /api/public/v2/observations?filter=&fromStartTime=&toStartTime=`. Parameters ---------- From e65ca773e8214dd1c3a0905e67e48603b36f78f9 Mon Sep 17 00:00:00 2001 From: Tobias Wochinger Date: Tue, 23 Jun 2026 11:30:33 +0200 Subject: [PATCH 2/2] test: update dataset item fixture --- tests/unit/test_propagate_attributes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_propagate_attributes.py b/tests/unit/test_propagate_attributes.py index b598e0835..109b88a37 100644 --- a/tests/unit/test_propagate_attributes.py +++ b/tests/unit/test_propagate_attributes.py @@ -2599,6 +2599,7 @@ def mock_create_dataset_run_item(*args, **kwargs): dataset_name="Test Dataset", created_at=datetime.now(), updated_at=datetime.now(), + media_references=[], ) # Create dataset client with items