Skip to content

Commit 062b935

Browse files
langfuse-botlangfuse-bot
andauthored
feat(api): update API spec from langfuse/langfuse 41f5847 (#1677)
Co-authored-by: langfuse-bot <langfuse-bot@langfuse.com>
1 parent f9c765b commit 062b935

104 files changed

Lines changed: 9784 additions & 35 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

langfuse/api/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
scores,
3333
sessions,
3434
trace,
35+
unstable,
3536
utils,
3637
)
3738
from .annotation_queues import (
@@ -50,8 +51,10 @@
5051
UpdateAnnotationQueueItemRequest,
5152
)
5253
from .blob_storage_integrations import (
54+
BlobStorageExportFieldGroup,
5355
BlobStorageExportFrequency,
5456
BlobStorageExportMode,
57+
BlobStorageExportSource,
5558
BlobStorageIntegrationDeletionResponse,
5659
BlobStorageIntegrationFileType,
5760
BlobStorageIntegrationResponse,
@@ -186,6 +189,7 @@
186189
UsageDetails,
187190
)
188191
from .llm_connections import (
192+
DeleteLlmConnectionResponse,
189193
LlmAdapter,
190194
LlmConnection,
191195
PaginatedLlmConnections,
@@ -312,8 +316,10 @@
312316
"BasePrompt": ".prompts",
313317
"BaseScore": ".commons",
314318
"BaseScoreV1": ".commons",
319+
"BlobStorageExportFieldGroup": ".blob_storage_integrations",
315320
"BlobStorageExportFrequency": ".blob_storage_integrations",
316321
"BlobStorageExportMode": ".blob_storage_integrations",
322+
"BlobStorageExportSource": ".blob_storage_integrations",
317323
"BlobStorageIntegrationDeletionResponse": ".blob_storage_integrations",
318324
"BlobStorageIntegrationFileType": ".blob_storage_integrations",
319325
"BlobStorageIntegrationResponse": ".blob_storage_integrations",
@@ -368,6 +374,7 @@
368374
"DeleteAnnotationQueueItemResponse": ".annotation_queues",
369375
"DeleteDatasetItemResponse": ".dataset_items",
370376
"DeleteDatasetRunResponse": ".datasets",
377+
"DeleteLlmConnectionResponse": ".llm_connections",
371378
"DeleteMembershipRequest": ".organizations",
372379
"DeleteTraceResponse": ".trace",
373380
"EmptyResponse": ".scim",
@@ -557,6 +564,7 @@
557564
"scores": ".scores",
558565
"sessions": ".sessions",
559566
"trace": ".trace",
567+
"unstable": ".unstable",
560568
"utils": ".utils",
561569
}
562570

@@ -605,8 +613,10 @@ def __dir__():
605613
"BasePrompt",
606614
"BaseScore",
607615
"BaseScoreV1",
616+
"BlobStorageExportFieldGroup",
608617
"BlobStorageExportFrequency",
609618
"BlobStorageExportMode",
619+
"BlobStorageExportSource",
610620
"BlobStorageIntegrationDeletionResponse",
611621
"BlobStorageIntegrationFileType",
612622
"BlobStorageIntegrationResponse",
@@ -661,6 +671,7 @@ def __dir__():
661671
"DeleteAnnotationQueueItemResponse",
662672
"DeleteDatasetItemResponse",
663673
"DeleteDatasetRunResponse",
674+
"DeleteLlmConnectionResponse",
664675
"DeleteMembershipRequest",
665676
"DeleteTraceResponse",
666677
"EmptyResponse",
@@ -850,5 +861,6 @@ def __dir__():
850861
"scores",
851862
"sessions",
852863
"trace",
864+
"unstable",
853865
"utils",
854866
]

langfuse/api/blob_storage_integrations/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
if typing.TYPE_CHECKING:
99
from .types import (
10+
BlobStorageExportFieldGroup,
1011
BlobStorageExportFrequency,
1112
BlobStorageExportMode,
13+
BlobStorageExportSource,
1214
BlobStorageIntegrationDeletionResponse,
1315
BlobStorageIntegrationFileType,
1416
BlobStorageIntegrationResponse,
@@ -19,8 +21,10 @@
1921
CreateBlobStorageIntegrationRequest,
2022
)
2123
_dynamic_imports: typing.Dict[str, str] = {
24+
"BlobStorageExportFieldGroup": ".types",
2225
"BlobStorageExportFrequency": ".types",
2326
"BlobStorageExportMode": ".types",
27+
"BlobStorageExportSource": ".types",
2428
"BlobStorageIntegrationDeletionResponse": ".types",
2529
"BlobStorageIntegrationFileType": ".types",
2630
"BlobStorageIntegrationResponse": ".types",
@@ -60,8 +64,10 @@ def __dir__():
6064

6165

6266
__all__ = [
67+
"BlobStorageExportFieldGroup",
6368
"BlobStorageExportFrequency",
6469
"BlobStorageExportMode",
70+
"BlobStorageExportSource",
6571
"BlobStorageIntegrationDeletionResponse",
6672
"BlobStorageIntegrationFileType",
6773
"BlobStorageIntegrationResponse",

langfuse/api/blob_storage_integrations/client.py

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
AsyncRawBlobStorageIntegrationsClient,
1010
RawBlobStorageIntegrationsClient,
1111
)
12+
from .types.blob_storage_export_field_group import BlobStorageExportFieldGroup
1213
from .types.blob_storage_export_frequency import BlobStorageExportFrequency
1314
from .types.blob_storage_export_mode import BlobStorageExportMode
15+
from .types.blob_storage_export_source import BlobStorageExportSource
1416
from .types.blob_storage_integration_deletion_response import (
1517
BlobStorageIntegrationDeletionResponse,
1618
)
@@ -95,6 +97,10 @@ def upsert_blob_storage_integration(
9597
prefix: typing.Optional[str] = OMIT,
9698
export_start_date: typing.Optional[dt.datetime] = OMIT,
9799
compressed: typing.Optional[bool] = OMIT,
100+
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
101+
export_field_groups: typing.Optional[
102+
typing.Sequence[BlobStorageExportFieldGroup]
103+
] = OMIT,
98104
request_options: typing.Optional[RequestOptions] = None,
99105
) -> BlobStorageIntegrationResponse:
100106
"""
@@ -143,6 +149,20 @@ def upsert_blob_storage_integration(
143149
compressed : typing.Optional[bool]
144150
Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true.
145151
152+
export_source : typing.Optional[BlobStorageExportSource]
153+
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.
154+
155+
**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.
156+
157+
export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]]
158+
Field groups to include in each exported row.
159+
160+
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.
161+
162+
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.
163+
164+
`exportFieldGroups` requires `exportSource` to be provided in the same request.
165+
146166
request_options : typing.Optional[RequestOptions]
147167
Request-specific configuration.
148168
@@ -173,7 +193,7 @@ def upsert_blob_storage_integration(
173193
type=BlobStorageIntegrationType.S3,
174194
bucket_name="bucketName",
175195
region="region",
176-
export_frequency=BlobStorageExportFrequency.HOURLY,
196+
export_frequency=BlobStorageExportFrequency.EVERY20MINUTES,
177197
enabled=True,
178198
force_path_style=True,
179199
file_type=BlobStorageIntegrationFileType.JSON,
@@ -196,6 +216,8 @@ def upsert_blob_storage_integration(
196216
prefix=prefix,
197217
export_start_date=export_start_date,
198218
compressed=compressed,
219+
export_source=export_source,
220+
export_field_groups=export_field_groups,
199221
request_options=request_options,
200222
)
201223
return _response.data
@@ -354,6 +376,10 @@ async def upsert_blob_storage_integration(
354376
prefix: typing.Optional[str] = OMIT,
355377
export_start_date: typing.Optional[dt.datetime] = OMIT,
356378
compressed: typing.Optional[bool] = OMIT,
379+
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
380+
export_field_groups: typing.Optional[
381+
typing.Sequence[BlobStorageExportFieldGroup]
382+
] = OMIT,
357383
request_options: typing.Optional[RequestOptions] = None,
358384
) -> BlobStorageIntegrationResponse:
359385
"""
@@ -402,6 +428,20 @@ async def upsert_blob_storage_integration(
402428
compressed : typing.Optional[bool]
403429
Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true.
404430
431+
export_source : typing.Optional[BlobStorageExportSource]
432+
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.
433+
434+
**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.
435+
436+
export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]]
437+
Field groups to include in each exported row.
438+
439+
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.
440+
441+
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.
442+
443+
`exportFieldGroups` requires `exportSource` to be provided in the same request.
444+
405445
request_options : typing.Optional[RequestOptions]
406446
Request-specific configuration.
407447
@@ -437,7 +477,7 @@ async def main() -> None:
437477
type=BlobStorageIntegrationType.S3,
438478
bucket_name="bucketName",
439479
region="region",
440-
export_frequency=BlobStorageExportFrequency.HOURLY,
480+
export_frequency=BlobStorageExportFrequency.EVERY20MINUTES,
441481
enabled=True,
442482
force_path_style=True,
443483
file_type=BlobStorageIntegrationFileType.JSON,
@@ -463,6 +503,8 @@ async def main() -> None:
463503
prefix=prefix,
464504
export_start_date=export_start_date,
465505
compressed=compressed,
506+
export_source=export_source,
507+
export_field_groups=export_field_groups,
466508
request_options=request_options,
467509
)
468510
return _response.data

langfuse/api/blob_storage_integrations/raw_client.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
from ..core.jsonable_encoder import jsonable_encoder
1616
from ..core.pydantic_utilities import parse_obj_as
1717
from ..core.request_options import RequestOptions
18+
from .types.blob_storage_export_field_group import BlobStorageExportFieldGroup
1819
from .types.blob_storage_export_frequency import BlobStorageExportFrequency
1920
from .types.blob_storage_export_mode import BlobStorageExportMode
21+
from .types.blob_storage_export_source import BlobStorageExportSource
2022
from .types.blob_storage_integration_deletion_response import (
2123
BlobStorageIntegrationDeletionResponse,
2224
)
@@ -152,6 +154,10 @@ def upsert_blob_storage_integration(
152154
prefix: typing.Optional[str] = OMIT,
153155
export_start_date: typing.Optional[dt.datetime] = OMIT,
154156
compressed: typing.Optional[bool] = OMIT,
157+
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
158+
export_field_groups: typing.Optional[
159+
typing.Sequence[BlobStorageExportFieldGroup]
160+
] = OMIT,
155161
request_options: typing.Optional[RequestOptions] = None,
156162
) -> HttpResponse[BlobStorageIntegrationResponse]:
157163
"""
@@ -200,6 +206,20 @@ def upsert_blob_storage_integration(
200206
compressed : typing.Optional[bool]
201207
Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true.
202208
209+
export_source : typing.Optional[BlobStorageExportSource]
210+
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.
211+
212+
**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.
213+
214+
export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]]
215+
Field groups to include in each exported row.
216+
217+
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.
218+
219+
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.
220+
221+
`exportFieldGroups` requires `exportSource` to be provided in the same request.
222+
203223
request_options : typing.Optional[RequestOptions]
204224
Request-specific configuration.
205225
@@ -226,6 +246,8 @@ def upsert_blob_storage_integration(
226246
"exportMode": export_mode,
227247
"exportStartDate": export_start_date,
228248
"compressed": compressed,
249+
"exportSource": export_source,
250+
"exportFieldGroups": export_field_groups,
229251
},
230252
request_options=request_options,
231253
omit=OMIT,
@@ -629,6 +651,10 @@ async def upsert_blob_storage_integration(
629651
prefix: typing.Optional[str] = OMIT,
630652
export_start_date: typing.Optional[dt.datetime] = OMIT,
631653
compressed: typing.Optional[bool] = OMIT,
654+
export_source: typing.Optional[BlobStorageExportSource] = OMIT,
655+
export_field_groups: typing.Optional[
656+
typing.Sequence[BlobStorageExportFieldGroup]
657+
] = OMIT,
632658
request_options: typing.Optional[RequestOptions] = None,
633659
) -> AsyncHttpResponse[BlobStorageIntegrationResponse]:
634660
"""
@@ -677,6 +703,20 @@ async def upsert_blob_storage_integration(
677703
compressed : typing.Optional[bool]
678704
Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true.
679705
706+
export_source : typing.Optional[BlobStorageExportSource]
707+
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.
708+
709+
**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.
710+
711+
export_field_groups : typing.Optional[typing.Sequence[BlobStorageExportFieldGroup]]
712+
Field groups to include in each exported row.
713+
714+
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.
715+
716+
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.
717+
718+
`exportFieldGroups` requires `exportSource` to be provided in the same request.
719+
680720
request_options : typing.Optional[RequestOptions]
681721
Request-specific configuration.
682722
@@ -703,6 +743,8 @@ async def upsert_blob_storage_integration(
703743
"exportMode": export_mode,
704744
"exportStartDate": export_start_date,
705745
"compressed": compressed,
746+
"exportSource": export_source,
747+
"exportFieldGroups": export_field_groups,
706748
},
707749
request_options=request_options,
708750
omit=OMIT,

langfuse/api/blob_storage_integrations/types/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
from importlib import import_module
77

88
if typing.TYPE_CHECKING:
9+
from .blob_storage_export_field_group import BlobStorageExportFieldGroup
910
from .blob_storage_export_frequency import BlobStorageExportFrequency
1011
from .blob_storage_export_mode import BlobStorageExportMode
12+
from .blob_storage_export_source import BlobStorageExportSource
1113
from .blob_storage_integration_deletion_response import (
1214
BlobStorageIntegrationDeletionResponse,
1315
)
@@ -23,8 +25,10 @@
2325
CreateBlobStorageIntegrationRequest,
2426
)
2527
_dynamic_imports: typing.Dict[str, str] = {
28+
"BlobStorageExportFieldGroup": ".blob_storage_export_field_group",
2629
"BlobStorageExportFrequency": ".blob_storage_export_frequency",
2730
"BlobStorageExportMode": ".blob_storage_export_mode",
31+
"BlobStorageExportSource": ".blob_storage_export_source",
2832
"BlobStorageIntegrationDeletionResponse": ".blob_storage_integration_deletion_response",
2933
"BlobStorageIntegrationFileType": ".blob_storage_integration_file_type",
3034
"BlobStorageIntegrationResponse": ".blob_storage_integration_response",
@@ -64,8 +68,10 @@ def __dir__():
6468

6569

6670
__all__ = [
71+
"BlobStorageExportFieldGroup",
6772
"BlobStorageExportFrequency",
6873
"BlobStorageExportMode",
74+
"BlobStorageExportSource",
6975
"BlobStorageIntegrationDeletionResponse",
7076
"BlobStorageIntegrationFileType",
7177
"BlobStorageIntegrationResponse",

0 commit comments

Comments
 (0)