Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
scores,
sessions,
trace,
unstable,
utils,
)
from .annotation_queues import (
Expand All @@ -50,8 +51,10 @@
UpdateAnnotationQueueItemRequest,
)
from .blob_storage_integrations import (
BlobStorageExportFieldGroup,
BlobStorageExportFrequency,
BlobStorageExportMode,
BlobStorageExportSource,
BlobStorageIntegrationDeletionResponse,
BlobStorageIntegrationFileType,
BlobStorageIntegrationResponse,
Expand Down Expand Up @@ -186,6 +189,7 @@
UsageDetails,
)
from .llm_connections import (
DeleteLlmConnectionResponse,
LlmAdapter,
LlmConnection,
PaginatedLlmConnections,
Expand Down Expand Up @@ -312,8 +316,10 @@
"BasePrompt": ".prompts",
"BaseScore": ".commons",
"BaseScoreV1": ".commons",
"BlobStorageExportFieldGroup": ".blob_storage_integrations",
"BlobStorageExportFrequency": ".blob_storage_integrations",
"BlobStorageExportMode": ".blob_storage_integrations",
"BlobStorageExportSource": ".blob_storage_integrations",
"BlobStorageIntegrationDeletionResponse": ".blob_storage_integrations",
"BlobStorageIntegrationFileType": ".blob_storage_integrations",
"BlobStorageIntegrationResponse": ".blob_storage_integrations",
Expand Down Expand Up @@ -368,6 +374,7 @@
"DeleteAnnotationQueueItemResponse": ".annotation_queues",
"DeleteDatasetItemResponse": ".dataset_items",
"DeleteDatasetRunResponse": ".datasets",
"DeleteLlmConnectionResponse": ".llm_connections",
"DeleteMembershipRequest": ".organizations",
"DeleteTraceResponse": ".trace",
"EmptyResponse": ".scim",
Expand Down Expand Up @@ -557,6 +564,7 @@
"scores": ".scores",
"sessions": ".sessions",
"trace": ".trace",
"unstable": ".unstable",
"utils": ".utils",
}

Expand Down Expand Up @@ -605,8 +613,10 @@ def __dir__():
"BasePrompt",
"BaseScore",
"BaseScoreV1",
"BlobStorageExportFieldGroup",
"BlobStorageExportFrequency",
"BlobStorageExportMode",
"BlobStorageExportSource",
"BlobStorageIntegrationDeletionResponse",
"BlobStorageIntegrationFileType",
"BlobStorageIntegrationResponse",
Expand Down Expand Up @@ -661,6 +671,7 @@ def __dir__():
"DeleteAnnotationQueueItemResponse",
"DeleteDatasetItemResponse",
"DeleteDatasetRunResponse",
"DeleteLlmConnectionResponse",
"DeleteMembershipRequest",
"DeleteTraceResponse",
"EmptyResponse",
Expand Down Expand Up @@ -850,5 +861,6 @@ def __dir__():
"scores",
"sessions",
"trace",
"unstable",
"utils",
]
6 changes: 6 additions & 0 deletions langfuse/api/blob_storage_integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

if typing.TYPE_CHECKING:
from .types import (
BlobStorageExportFieldGroup,
BlobStorageExportFrequency,
BlobStorageExportMode,
BlobStorageExportSource,
BlobStorageIntegrationDeletionResponse,
BlobStorageIntegrationFileType,
BlobStorageIntegrationResponse,
Expand All @@ -19,8 +21,10 @@
CreateBlobStorageIntegrationRequest,
)
_dynamic_imports: typing.Dict[str, str] = {
"BlobStorageExportFieldGroup": ".types",
"BlobStorageExportFrequency": ".types",
"BlobStorageExportMode": ".types",
"BlobStorageExportSource": ".types",
"BlobStorageIntegrationDeletionResponse": ".types",
"BlobStorageIntegrationFileType": ".types",
"BlobStorageIntegrationResponse": ".types",
Expand Down Expand Up @@ -60,8 +64,10 @@ def __dir__():


__all__ = [
"BlobStorageExportFieldGroup",
"BlobStorageExportFrequency",
"BlobStorageExportMode",
"BlobStorageExportSource",
"BlobStorageIntegrationDeletionResponse",
"BlobStorageIntegrationFileType",
"BlobStorageIntegrationResponse",
Expand Down
46 changes: 44 additions & 2 deletions langfuse/api/blob_storage_integrations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
AsyncRawBlobStorageIntegrationsClient,
RawBlobStorageIntegrationsClient,
)
from .types.blob_storage_export_field_group import BlobStorageExportFieldGroup
from .types.blob_storage_export_frequency import BlobStorageExportFrequency
from .types.blob_storage_export_mode import BlobStorageExportMode
from .types.blob_storage_export_source import BlobStorageExportSource
from .types.blob_storage_integration_deletion_response import (
BlobStorageIntegrationDeletionResponse,
)
Expand Down Expand Up @@ -95,6 +97,10 @@ def upsert_blob_storage_integration(
prefix: typing.Optional[str] = OMIT,
export_start_date: typing.Optional[dt.datetime] = OMIT,
compressed: typing.Optional[bool] = OMIT,
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
export_field_groups: typing.Optional[
typing.Sequence[BlobStorageExportFieldGroup]
] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BlobStorageIntegrationResponse:
"""
Expand Down Expand Up @@ -143,6 +149,20 @@ def upsert_blob_storage_integration(
compressed : typing.Optional[bool]
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.

**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.

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.

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.

`exportFieldGroups` requires `exportSource` to be provided in the same request.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -173,7 +193,7 @@ def upsert_blob_storage_integration(
type=BlobStorageIntegrationType.S3,
bucket_name="bucketName",
region="region",
export_frequency=BlobStorageExportFrequency.HOURLY,
export_frequency=BlobStorageExportFrequency.EVERY20MINUTES,
enabled=True,
force_path_style=True,
file_type=BlobStorageIntegrationFileType.JSON,
Expand All @@ -196,6 +216,8 @@ def upsert_blob_storage_integration(
prefix=prefix,
export_start_date=export_start_date,
compressed=compressed,
export_source=export_source,
export_field_groups=export_field_groups,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -354,6 +376,10 @@ async def upsert_blob_storage_integration(
prefix: typing.Optional[str] = OMIT,
export_start_date: typing.Optional[dt.datetime] = OMIT,
compressed: typing.Optional[bool] = OMIT,
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
export_field_groups: typing.Optional[
typing.Sequence[BlobStorageExportFieldGroup]
] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BlobStorageIntegrationResponse:
"""
Expand Down Expand Up @@ -402,6 +428,20 @@ async def upsert_blob_storage_integration(
compressed : typing.Optional[bool]
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.

**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.

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.

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.

`exportFieldGroups` requires `exportSource` to be provided in the same request.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -437,7 +477,7 @@ async def main() -> None:
type=BlobStorageIntegrationType.S3,
bucket_name="bucketName",
region="region",
export_frequency=BlobStorageExportFrequency.HOURLY,
export_frequency=BlobStorageExportFrequency.EVERY20MINUTES,
enabled=True,
force_path_style=True,
file_type=BlobStorageIntegrationFileType.JSON,
Expand All @@ -463,6 +503,8 @@ async def main() -> None:
prefix=prefix,
export_start_date=export_start_date,
compressed=compressed,
export_source=export_source,
export_field_groups=export_field_groups,
request_options=request_options,
)
return _response.data
Expand Down
42 changes: 42 additions & 0 deletions langfuse/api/blob_storage_integrations/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
from ..core.jsonable_encoder import jsonable_encoder
from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
from .types.blob_storage_export_field_group import BlobStorageExportFieldGroup
from .types.blob_storage_export_frequency import BlobStorageExportFrequency
from .types.blob_storage_export_mode import BlobStorageExportMode
from .types.blob_storage_export_source import BlobStorageExportSource
from .types.blob_storage_integration_deletion_response import (
BlobStorageIntegrationDeletionResponse,
)
Expand Down Expand Up @@ -152,6 +154,10 @@ def upsert_blob_storage_integration(
prefix: typing.Optional[str] = OMIT,
export_start_date: typing.Optional[dt.datetime] = OMIT,
compressed: typing.Optional[bool] = OMIT,
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
export_field_groups: typing.Optional[
typing.Sequence[BlobStorageExportFieldGroup]
] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BlobStorageIntegrationResponse]:
"""
Expand Down Expand Up @@ -200,6 +206,20 @@ def upsert_blob_storage_integration(
compressed : typing.Optional[bool]
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.

**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.

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.

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.

`exportFieldGroups` requires `exportSource` to be provided in the same request.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -226,6 +246,8 @@ def upsert_blob_storage_integration(
"exportMode": export_mode,
"exportStartDate": export_start_date,
"compressed": compressed,
"exportSource": export_source,
"exportFieldGroups": export_field_groups,
},
request_options=request_options,
omit=OMIT,
Expand Down Expand Up @@ -629,6 +651,10 @@ async def upsert_blob_storage_integration(
prefix: typing.Optional[str] = OMIT,
export_start_date: typing.Optional[dt.datetime] = OMIT,
compressed: typing.Optional[bool] = OMIT,
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
export_field_groups: typing.Optional[
typing.Sequence[BlobStorageExportFieldGroup]
] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BlobStorageIntegrationResponse]:
"""
Expand Down Expand Up @@ -677,6 +703,20 @@ async def upsert_blob_storage_integration(
compressed : typing.Optional[bool]
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.

**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.

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.

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.

`exportFieldGroups` requires `exportSource` to be provided in the same request.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -703,6 +743,8 @@ async def upsert_blob_storage_integration(
"exportMode": export_mode,
"exportStartDate": export_start_date,
"compressed": compressed,
"exportSource": export_source,
"exportFieldGroups": export_field_groups,
},
request_options=request_options,
omit=OMIT,
Expand Down
6 changes: 6 additions & 0 deletions langfuse/api/blob_storage_integrations/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
from importlib import import_module

if typing.TYPE_CHECKING:
from .blob_storage_export_field_group import BlobStorageExportFieldGroup
from .blob_storage_export_frequency import BlobStorageExportFrequency
from .blob_storage_export_mode import BlobStorageExportMode
from .blob_storage_export_source import BlobStorageExportSource
from .blob_storage_integration_deletion_response import (
BlobStorageIntegrationDeletionResponse,
)
Expand All @@ -23,8 +25,10 @@
CreateBlobStorageIntegrationRequest,
)
_dynamic_imports: typing.Dict[str, str] = {
"BlobStorageExportFieldGroup": ".blob_storage_export_field_group",
"BlobStorageExportFrequency": ".blob_storage_export_frequency",
"BlobStorageExportMode": ".blob_storage_export_mode",
"BlobStorageExportSource": ".blob_storage_export_source",
"BlobStorageIntegrationDeletionResponse": ".blob_storage_integration_deletion_response",
"BlobStorageIntegrationFileType": ".blob_storage_integration_file_type",
"BlobStorageIntegrationResponse": ".blob_storage_integration_response",
Expand Down Expand Up @@ -64,8 +68,10 @@ def __dir__():


__all__ = [
"BlobStorageExportFieldGroup",
"BlobStorageExportFrequency",
"BlobStorageExportMode",
"BlobStorageExportSource",
"BlobStorageIntegrationDeletionResponse",
"BlobStorageIntegrationFileType",
"BlobStorageIntegrationResponse",
Expand Down
Loading