diff --git a/langfuse/api/blob_storage_integrations/client.py b/langfuse/api/blob_storage_integrations/client.py index 609e83fd3..bf7ab406d 100644 --- a/langfuse/api/blob_storage_integrations/client.py +++ b/langfuse/api/blob_storage_integrations/client.py @@ -150,16 +150,14 @@ def upsert_blob_storage_integration( Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. export_source : typing.Optional[BlobStorageExportSource] - Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided. + Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided. - **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected. + **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected. - export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] - Field groups to include in each exported row. - - For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. + **Cloud-only integration deprecation gate (effective 2026-06-22):** On Langfuse Cloud, legacy export sources are only accepted for blob storage integrations created before 2026-06-22, regardless of project age. Requests that would create a new integration with `LEGACY_TRACES_OBSERVATIONS` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` instead. Self-hosted deployments are unaffected. - For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups. + export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] + Field groups to include in each exported observation row. Applies to all export sources; must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. `exportFieldGroups` requires `exportSource` to be provided in the same request. @@ -429,16 +427,14 @@ async def upsert_blob_storage_integration( Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. export_source : typing.Optional[BlobStorageExportSource] - Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided. + Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided. - **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected. + **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected. - export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] - Field groups to include in each exported row. - - For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. + **Cloud-only integration deprecation gate (effective 2026-06-22):** On Langfuse Cloud, legacy export sources are only accepted for blob storage integrations created before 2026-06-22, regardless of project age. Requests that would create a new integration with `LEGACY_TRACES_OBSERVATIONS` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` instead. Self-hosted deployments are unaffected. - For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups. + export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] + Field groups to include in each exported observation row. Applies to all export sources; must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. `exportFieldGroups` requires `exportSource` to be provided in the same request. diff --git a/langfuse/api/blob_storage_integrations/raw_client.py b/langfuse/api/blob_storage_integrations/raw_client.py index 09e036db6..2899c8b7c 100644 --- a/langfuse/api/blob_storage_integrations/raw_client.py +++ b/langfuse/api/blob_storage_integrations/raw_client.py @@ -207,16 +207,14 @@ def upsert_blob_storage_integration( Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. export_source : typing.Optional[BlobStorageExportSource] - Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided. + Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided. - **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected. + **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected. - export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] - Field groups to include in each exported row. - - For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. + **Cloud-only integration deprecation gate (effective 2026-06-22):** On Langfuse Cloud, legacy export sources are only accepted for blob storage integrations created before 2026-06-22, regardless of project age. Requests that would create a new integration with `LEGACY_TRACES_OBSERVATIONS` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` instead. Self-hosted deployments are unaffected. - For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups. + export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] + Field groups to include in each exported observation row. Applies to all export sources; must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. `exportFieldGroups` requires `exportSource` to be provided in the same request. @@ -704,16 +702,14 @@ async def upsert_blob_storage_integration( Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. export_source : typing.Optional[BlobStorageExportSource] - Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided. + Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided. - **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected. + **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected. - export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] - Field groups to include in each exported row. - - For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. + **Cloud-only integration deprecation gate (effective 2026-06-22):** On Langfuse Cloud, legacy export sources are only accepted for blob storage integrations created before 2026-06-22, regardless of project age. Requests that would create a new integration with `LEGACY_TRACES_OBSERVATIONS` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` instead. Self-hosted deployments are unaffected. - For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups. + export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]] + Field groups to include in each exported observation row. Applies to all export sources; must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. `exportFieldGroups` requires `exportSource` to be provided in the same request. diff --git a/langfuse/api/blob_storage_integrations/types/blob_storage_export_field_group.py b/langfuse/api/blob_storage_integrations/types/blob_storage_export_field_group.py index c21a9c3bb..32bdbf89d 100644 --- a/langfuse/api/blob_storage_integrations/types/blob_storage_export_field_group.py +++ b/langfuse/api/blob_storage_integrations/types/blob_storage_export_field_group.py @@ -9,7 +9,7 @@ class BlobStorageExportFieldGroup(enum.StrEnum): """ - Field group for the OBSERVATIONS_V2 and LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS export. + Field group selecting which observation columns are included in the export. Applies to all export sources; groups without a counterpart in the legacy data model (e.g. `trace_context`) are omitted from the legacy observations export. """ CORE = "core" diff --git a/langfuse/api/blob_storage_integrations/types/blob_storage_export_source.py b/langfuse/api/blob_storage_integrations/types/blob_storage_export_source.py index 1451473b4..629397a29 100644 --- a/langfuse/api/blob_storage_integrations/types/blob_storage_export_source.py +++ b/langfuse/api/blob_storage_integrations/types/blob_storage_export_source.py @@ -10,9 +10,9 @@ class BlobStorageExportSource(enum.StrEnum): """ What data the integration exports. - - `LEGACY_TRACES_OBSERVATIONS`: traces, observations, and scores tables with a fixed column set. The `exportFieldGroups` field is not applicable. + - `LEGACY_TRACES_OBSERVATIONS`: traces, observations, and scores tables. Observation columns are controlled by `exportFieldGroups`; field groups without a counterpart in this data model (e.g. `trace_context`) are omitted. - `OBSERVATIONS_V2`: same data model as the `/api/public/v2/observations` endpoint, plus scores. Columns are controlled by `exportFieldGroups`. - - `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. For the `OBSERVATIONS_V2` portion, columns are controlled by `exportFieldGroups`. + - `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. Observation columns of both portions are controlled by `exportFieldGroups`. **Note:** `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` rely on the enriched observations table (Langfuse Fast Preview / v4), which is currently available on Langfuse Cloud only. See https://langfuse.com/docs/v4. """ diff --git a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py index e2b5921a0..9c87ba629 100644 --- a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py +++ b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py @@ -51,7 +51,7 @@ class BlobStorageIntegrationResponse(UniversalBaseModel): FieldMetadata(alias="exportFieldGroups"), ] = pydantic.Field(default=None) """ - Field groups included in each exported row for `OBSERVATIONS_V2` / `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` sources. Always `null` when exportSource is `LEGACY_TRACES_OBSERVATIONS` (the field does not apply to that source; any legacy DB value is hidden from the public surface). + Field groups included in each exported observation row. An empty list is treated as all groups during export. """ next_sync_at: typing_extensions.Annotated[ diff --git a/langfuse/api/blob_storage_integrations/types/create_blob_storage_integration_request.py b/langfuse/api/blob_storage_integrations/types/create_blob_storage_integration_request.py index 89c9bca4a..bba3205f8 100644 --- a/langfuse/api/blob_storage_integrations/types/create_blob_storage_integration_request.py +++ b/langfuse/api/blob_storage_integrations/types/create_blob_storage_integration_request.py @@ -97,9 +97,11 @@ class CreateBlobStorageIntegrationRequest(UniversalBaseModel): typing.Optional[BlobStorageExportSource], FieldMetadata(alias="exportSource") ] = pydantic.Field(default=None) """ - Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided. + Data to export. When omitted on update, the existing value is preserved. When omitted on create: integrations on Langfuse Cloud default to `OBSERVATIONS_V2`; self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`. Required when `exportFieldGroups` is provided. - **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected. + **Cloud-only project deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` for all new integrations. Self-hosted deployments are unaffected. + + **Cloud-only integration deprecation gate (effective 2026-06-22):** On Langfuse Cloud, legacy export sources are only accepted for blob storage integrations created before 2026-06-22, regardless of project age. Requests that would create a new integration with `LEGACY_TRACES_OBSERVATIONS` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Use `OBSERVATIONS_V2` instead. Self-hosted deployments are unaffected. """ export_field_groups: typing_extensions.Annotated[ @@ -107,11 +109,7 @@ class CreateBlobStorageIntegrationRequest(UniversalBaseModel): FieldMetadata(alias="exportFieldGroups"), ] = pydantic.Field(default=None) """ - Field groups to include in each exported row. - - For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. - - For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups. + Field groups to include in each exported observation row. Applies to all export sources; must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved. `exportFieldGroups` requires `exportSource` to be provided in the same request. """ diff --git a/langfuse/api/dataset_items/client.py b/langfuse/api/dataset_items/client.py index c44ca24d8..1f28c96fd 100644 --- a/langfuse/api/dataset_items/client.py +++ b/langfuse/api/dataset_items/client.py @@ -61,7 +61,7 @@ def create( source_observation_id : typing.Optional[str] id : typing.Optional[str] - Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets. + Dataset items are upserted on their id. Id needs to be unique (project-level), cannot be reused across datasets, and must be at most 255 characters. status : typing.Optional[DatasetStatus] Defaults to ACTIVE for newly created items @@ -287,7 +287,7 @@ async def create( source_observation_id : typing.Optional[str] id : typing.Optional[str] - Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets. + Dataset items are upserted on their id. Id needs to be unique (project-level), cannot be reused across datasets, and must be at most 255 characters. status : typing.Optional[DatasetStatus] Defaults to ACTIVE for newly created items diff --git a/langfuse/api/dataset_items/raw_client.py b/langfuse/api/dataset_items/raw_client.py index 6aeafb54d..970bc25d0 100644 --- a/langfuse/api/dataset_items/raw_client.py +++ b/langfuse/api/dataset_items/raw_client.py @@ -60,7 +60,7 @@ def create( source_observation_id : typing.Optional[str] id : typing.Optional[str] - Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets. + Dataset items are upserted on their id. Id needs to be unique (project-level), cannot be reused across datasets, and must be at most 255 characters. status : typing.Optional[DatasetStatus] Defaults to ACTIVE for newly created items @@ -534,7 +534,7 @@ async def create( source_observation_id : typing.Optional[str] id : typing.Optional[str] - Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets. + Dataset items are upserted on their id. Id needs to be unique (project-level), cannot be reused across datasets, and must be at most 255 characters. status : typing.Optional[DatasetStatus] Defaults to ACTIVE for newly created items diff --git a/langfuse/api/dataset_items/types/create_dataset_item_request.py b/langfuse/api/dataset_items/types/create_dataset_item_request.py index b778e42ae..ad36cf45c 100644 --- a/langfuse/api/dataset_items/types/create_dataset_item_request.py +++ b/langfuse/api/dataset_items/types/create_dataset_item_request.py @@ -24,7 +24,7 @@ class CreateDatasetItemRequest(UniversalBaseModel): ] = None id: typing.Optional[str] = pydantic.Field(default=None) """ - Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets. + Dataset items are upserted on their id. Id needs to be unique (project-level), cannot be reused across datasets, and must be at most 255 characters. """ status: typing.Optional[DatasetStatus] = pydantic.Field(default=None) diff --git a/langfuse/api/scores/client.py b/langfuse/api/scores/client.py index 566530e21..3de8f5ef0 100644 --- a/langfuse/api/scores/client.py +++ b/langfuse/api/scores/client.py @@ -54,6 +54,9 @@ def get_many( request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ + **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint + is no longer available on Langfuse v4 and later. + Get a list of scores (supports both trace and session scores) Parameters @@ -172,6 +175,9 @@ def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> Score: """ + **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter + instead. This endpoint is no longer available on Langfuse v4 and later. + Get a score (supports both trace and session scores) Parameters @@ -250,6 +256,9 @@ async def get_many( request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ + **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint + is no longer available on Langfuse v4 and later. + Get a list of scores (supports both trace and session scores) Parameters @@ -376,6 +385,9 @@ async def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> Score: """ + **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter + instead. This endpoint is no longer available on Langfuse v4 and later. + Get a score (supports both trace and session scores) Parameters diff --git a/langfuse/api/scores/raw_client.py b/langfuse/api/scores/raw_client.py index d1508545c..3105cb18d 100644 --- a/langfuse/api/scores/raw_client.py +++ b/langfuse/api/scores/raw_client.py @@ -53,6 +53,9 @@ def get_many( request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[GetScoresResponse]: """ + **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint + is no longer available on Langfuse v4 and later. + Get a list of scores (supports both trace and session scores) Parameters @@ -241,6 +244,9 @@ def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> HttpResponse[Score]: """ + **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter + instead. This endpoint is no longer available on Langfuse v4 and later. + Get a score (supports both trace and session scores) Parameters @@ -370,6 +376,9 @@ async def get_many( request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[GetScoresResponse]: """ + **Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint + is no longer available on Langfuse v4 and later. + Get a list of scores (supports both trace and session scores) Parameters @@ -558,6 +567,9 @@ async def get_by_id( self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> AsyncHttpResponse[Score]: """ + **Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter + instead. This endpoint is no longer available on Langfuse v4 and later. + Get a score (supports both trace and session scores) Parameters diff --git a/langfuse/api/scores_v3/client.py b/langfuse/api/scores_v3/client.py index 2755d3e74..d5afda7dd 100644 --- a/langfuse/api/scores_v3/client.py +++ b/langfuse/api/scores_v3/client.py @@ -52,15 +52,22 @@ def get_many_v3( """ Get a list of scores with a polymorphic `value` field (v3). - This endpoint requires Langfuse v4 or later. - The `value` field type depends on `dataType`: - `NUMERIC` → number - `BOOLEAN` → boolean - `CATEGORICAL`, `TEXT`, `CORRECTION` → string - Use the `fields` parameter to include optional field groups beyond the - default `core`. Unknown group names return HTTP 400. + The response always includes the core fields: id, projectId, name, + value, dataType, source, timestamp, environment, createdAt, updatedAt. + + Additional field groups can be requested via the `fields` parameter: + - `details` — adds comment, configId, metadata + - `subject` — adds the subject object describing the entity the score + is attached to: kind (trace, observation, session, or experiment), + id, and traceId for observation-level scores + - `annotation` — adds authorUserId, queueId + + Unknown group names return HTTP 400. Parameters ---------- @@ -71,7 +78,7 @@ def get_many_v3( URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page. fields : typing.Optional[str] - Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. + Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400. id : typing.Optional[str] Comma-separated list of score IDs to filter by (OR within, AND across filters). @@ -214,15 +221,22 @@ async def get_many_v3( """ Get a list of scores with a polymorphic `value` field (v3). - This endpoint requires Langfuse v4 or later. - The `value` field type depends on `dataType`: - `NUMERIC` → number - `BOOLEAN` → boolean - `CATEGORICAL`, `TEXT`, `CORRECTION` → string - Use the `fields` parameter to include optional field groups beyond the - default `core`. Unknown group names return HTTP 400. + The response always includes the core fields: id, projectId, name, + value, dataType, source, timestamp, environment, createdAt, updatedAt. + + Additional field groups can be requested via the `fields` parameter: + - `details` — adds comment, configId, metadata + - `subject` — adds the subject object describing the entity the score + is attached to: kind (trace, observation, session, or experiment), + id, and traceId for observation-level scores + - `annotation` — adds authorUserId, queueId + + Unknown group names return HTTP 400. Parameters ---------- @@ -233,7 +247,7 @@ async def get_many_v3( URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page. fields : typing.Optional[str] - Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. + Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400. id : typing.Optional[str] Comma-separated list of score IDs to filter by (OR within, AND across filters). diff --git a/langfuse/api/scores_v3/raw_client.py b/langfuse/api/scores_v3/raw_client.py index 47c9f3f8d..cc0793172 100644 --- a/langfuse/api/scores_v3/raw_client.py +++ b/langfuse/api/scores_v3/raw_client.py @@ -50,15 +50,22 @@ def get_many_v3( """ Get a list of scores with a polymorphic `value` field (v3). - This endpoint requires Langfuse v4 or later. - The `value` field type depends on `dataType`: - `NUMERIC` → number - `BOOLEAN` → boolean - `CATEGORICAL`, `TEXT`, `CORRECTION` → string - Use the `fields` parameter to include optional field groups beyond the - default `core`. Unknown group names return HTTP 400. + The response always includes the core fields: id, projectId, name, + value, dataType, source, timestamp, environment, createdAt, updatedAt. + + Additional field groups can be requested via the `fields` parameter: + - `details` — adds comment, configId, metadata + - `subject` — adds the subject object describing the entity the score + is attached to: kind (trace, observation, session, or experiment), + id, and traceId for observation-level scores + - `annotation` — adds authorUserId, queueId + + Unknown group names return HTTP 400. Parameters ---------- @@ -69,7 +76,7 @@ def get_many_v3( URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page. fields : typing.Optional[str] - Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. + Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400. id : typing.Optional[str] Comma-separated list of score IDs to filter by (OR within, AND across filters). @@ -271,15 +278,22 @@ async def get_many_v3( """ Get a list of scores with a polymorphic `value` field (v3). - This endpoint requires Langfuse v4 or later. - The `value` field type depends on `dataType`: - `NUMERIC` → number - `BOOLEAN` → boolean - `CATEGORICAL`, `TEXT`, `CORRECTION` → string - Use the `fields` parameter to include optional field groups beyond the - default `core`. Unknown group names return HTTP 400. + The response always includes the core fields: id, projectId, name, + value, dataType, source, timestamp, environment, createdAt, updatedAt. + + Additional field groups can be requested via the `fields` parameter: + - `details` — adds comment, configId, metadata + - `subject` — adds the subject object describing the entity the score + is attached to: kind (trace, observation, session, or experiment), + id, and traceId for observation-level scores + - `annotation` — adds authorUserId, queueId + + Unknown group names return HTTP 400. Parameters ---------- @@ -290,7 +304,7 @@ async def get_many_v3( URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page. fields : typing.Optional[str] - Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. + Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400. id : typing.Optional[str] Comma-separated list of score IDs to filter by (OR within, AND across filters).